Package javassist.bytecode.annotation
Class AnnotationMemberValue
- java.lang.Object
-
- javassist.bytecode.annotation.MemberValue
-
- javassist.bytecode.annotation.AnnotationMemberValue
-
public class AnnotationMemberValue extends MemberValue
Nested annotation.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Annotationvalue-
Fields inherited from class javassist.bytecode.annotation.MemberValue
cp, tag
-
-
Constructor Summary
Constructors Constructor Description AnnotationMemberValue(Annotation a, ConstPool cp)Constructs an annotation member.AnnotationMemberValue(ConstPool cp)Constructs an annotation member.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(MemberValueVisitor visitor)Accepts a visitor.(package private) java.lang.ClassgetType(java.lang.ClassLoader cl)AnnotationgetValue()Obtains the value.(package private) java.lang.ObjectgetValue(java.lang.ClassLoader cl, ClassPool cp, java.lang.reflect.Method m)Returns the value.voidsetValue(Annotation newValue)Sets the value of this member.java.lang.StringtoString()Obtains the string representation of this object.voidwrite(AnnotationsWriter writer)Writes the value.-
Methods inherited from class javassist.bytecode.annotation.MemberValue
loadClass
-
-
-
-
Field Detail
-
value
Annotation value
-
-
Constructor Detail
-
AnnotationMemberValue
public AnnotationMemberValue(ConstPool cp)
Constructs an annotation member. The initial value is not specified.
-
AnnotationMemberValue
public AnnotationMemberValue(Annotation a, ConstPool cp)
Constructs an annotation member. The initial value is specified by the first parameter.
-
-
Method Detail
-
getValue
java.lang.Object getValue(java.lang.ClassLoader cl, ClassPool cp, java.lang.reflect.Method m) throws java.lang.ClassNotFoundExceptionDescription copied from class:MemberValueReturns the value. If the value type is a primitive type, the returned value is boxed.- Specified by:
getValuein classMemberValue- Throws:
java.lang.ClassNotFoundException
-
getType
java.lang.Class getType(java.lang.ClassLoader cl) throws java.lang.ClassNotFoundException- Specified by:
getTypein classMemberValue- Throws:
java.lang.ClassNotFoundException
-
getValue
public Annotation getValue()
Obtains the value.
-
setValue
public void setValue(Annotation newValue)
Sets the value of this member.
-
toString
public java.lang.String toString()
Obtains the string representation of this object.- Overrides:
toStringin classjava.lang.Object
-
write
public void write(AnnotationsWriter writer) throws java.io.IOException
Writes the value.- Specified by:
writein classMemberValue- Throws:
java.io.IOException
-
accept
public void accept(MemberValueVisitor visitor)
Accepts a visitor.- Specified by:
acceptin classMemberValue
-
-