1 11 package org.eclipse.jdt.internal.compiler.classfmt; 12 13 import org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation; 14 15 class MethodInfoWithParameterAnnotations extends MethodInfoWithAnnotations { 16 private AnnotationInfo[][] parameterAnnotations; 17 18 MethodInfoWithParameterAnnotations(MethodInfo methodInfo, AnnotationInfo[] annotations, AnnotationInfo[][] parameterAnnotations) { 19 super(methodInfo, annotations); 20 this.parameterAnnotations = parameterAnnotations; 21 } 22 23 public IBinaryAnnotation[] getParameterAnnotations(int index) { 24 return this.parameterAnnotations[index]; 25 } 26 protected void initialize() { 27 for (int i = 0, l = this.parameterAnnotations == null ? 0 : this.parameterAnnotations.length; i < l; i++) { 28 AnnotationInfo[] infos = this.parameterAnnotations[i]; 29 for (int j = 0, k = infos == null ? 0 : infos.length; j < k; j++) 30 infos[j].initialize(); 31 } 32 super.initialize(); 33 } 34 protected void reset() { 35 for (int i = 0, l = this.parameterAnnotations == null ? 0 : this.parameterAnnotations.length; i < l; i++) { 36 AnnotationInfo[] infos = this.parameterAnnotations[i]; 37 for (int j = 0, k = infos == null ? 0 : infos.length; j < k; j++) 38 infos[j].reset(); 39 } 40 super.reset(); 41 } 42 protected void toStringContent(StringBuffer buffer) { 43 super.toStringContent(buffer); 44 for (int i = 0, l = this.parameterAnnotations == null ? 0 : this.parameterAnnotations.length; i < l; i++) { 45 buffer.append("param" + (i - 1)); buffer.append('\n'); 47 AnnotationInfo[] infos = this.parameterAnnotations[i]; 48 for (int j = 0, k = infos == null ? 0 : infos.length; j < k; j++) { 49 buffer.append(infos[j]); 50 buffer.append('\n'); 51 } 52 } 53 } 54 } 55 | Popular Tags |