1 11 package org.eclipse.jdt.internal.compiler.classfmt; 12 13 import org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation; 14 15 public class AnnotationMethodInfoWithAnnotations extends AnnotationMethodInfo { 16 private AnnotationInfo[] annotations; 17 18 AnnotationMethodInfoWithAnnotations(MethodInfo methodInfo, Object defaultValue, AnnotationInfo[] annotations) { 19 super(methodInfo, defaultValue); 20 this.annotations = annotations; 21 } 22 public IBinaryAnnotation[] getAnnotations() { 23 return this.annotations; 24 } 25 protected void initialize() { 26 for (int i = 0, l = this.annotations == null ? 0 : this.annotations.length; i < l; i++) 27 if (this.annotations[i] != null) 28 this.annotations[i].initialize(); 29 super.initialize(); 30 } 31 protected void reset() { 32 for (int i = 0, l = this.annotations == null ? 0 : this.annotations.length; i < l; i++) 33 if (this.annotations[i] != null) 34 this.annotations[i].reset(); 35 super.reset(); 36 } 37 protected void toStringContent(StringBuffer buffer) { 38 super.toStringContent(buffer); 39 for (int i = 0, l = this.annotations == null ? 0 : this.annotations.length; i < l; i++) { 40 buffer.append(this.annotations[i]); 41 buffer.append('\n'); 42 } 43 } 44 } 45 | Popular Tags |