| java.lang.Object javassist.bytecode.annotation.Annotation
Inner Class :static class Pair | |
Annotation | public Annotation(int type, ConstPool cp)(Code) | | Constructs an annotation including no members. A member can be
later added to the created annotation by addMemberValue() .
Parameters: type - the index into the constant pool table.the entry at that index must be theCONSTANT_Utf8_Info structurerepreenting the name of the annotation interface type. Parameters: cp - the constant pool table. See Also: Annotation.addMemberValue(String,MemberValue) |
Annotation | public Annotation(String typeName, ConstPool cp)(Code) | | Constructs an annotation including no members. A member can be
later added to the created annotation by addMemberValue() .
Parameters: typeName - the name of the annotation interface type. Parameters: cp - the constant pool table. See Also: Annotation.addMemberValue(String,MemberValue) |
Annotation | public Annotation(ConstPool cp, CtClass clazz) throws javassist.NotFoundException(Code) | | Constructs an annotation that can be accessed through the interface
represented by clazz . The values of the members are
not specified.
Parameters: cp - the constant pool table. Parameters: clazz - the interface. |
addMemberValue | public void addMemberValue(int nameIndex, MemberValue value)(Code) | | Adds a new member.
Parameters: nameIndex - the index into the constant pool table.The entry at that index must bea CONSTANT_Utf8_info structure.structure representing the member name. Parameters: value - the member value. |
addMemberValue | public void addMemberValue(String name, MemberValue value)(Code) | | Adds a new member.
Parameters: name - the member name. Parameters: value - the member value. |
getMemberNames | public Set getMemberNames()(Code) | | Obtains all the member names.
null if no members are defined. |
getMemberValue | public MemberValue getMemberValue(String name)(Code) | | Obtains the member value with the given name.
If this annotation does not have a value for the
specified member,
this method returns null. It does not return a
MemberValue with the default value.
The default value can be obtained from the annotation type.
null if the member cannot be found or if the value isthe default value. See Also: javassist.bytecode.AnnotationDefaultAttribute |
getTypeName | public String getTypeName()(Code) | | Obtains the name of the annotation type.
|
toAnnotationType | public Object toAnnotationType(ClassLoader cl, ClassPool cp) throws ClassNotFoundException(Code) | | Constructs an annotation-type object representing this annotation.
For example, if this annotation represents @Author ,
this method returns an Author object.
Parameters: cl - class loader for loading an annotation type. Parameters: cp - class pool for obtaining class files. |
toString | public String toString()(Code) | | Returns a string representation of this object.
|
|
|