1 15 package javassist.bytecode.annotation; 16 17 import javassist.bytecode.ConstPool; 18 import java.io.IOException ; 19 20 26 public class AnnotationMemberValue extends MemberValue { 27 Annotation value; 28 29 32 public AnnotationMemberValue(ConstPool cp) { 33 this(null, cp); 34 } 35 36 40 public AnnotationMemberValue(Annotation a, ConstPool cp) { 41 super('@', cp); 42 value = a; 43 } 44 45 48 public Annotation getValue() { 49 return value; 50 } 51 52 55 public void setValue(Annotation newValue) { 56 value = newValue; 57 } 58 59 62 public String toString() { 63 return value.toString(); 64 } 65 66 void write(AnnotationsWriter writer) throws IOException { 67 writer.annotationValue(); 68 value.write(writer); 69 } 70 71 74 public void accept(MemberValueVisitor visitor) { 75 visitor.visitAnnotationMemberValue(this); 76 } 77 } 78 | Popular Tags |