CtMember represents a field, a constructor,
or a method.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | extendToString(StringBuilder buffer)
Invoked by |
| public abstract Object | Returns: the annotation if found, otherwisenull.the annotation type. annotationType)Returns the annotation if the class has the specified annotation type. |
| public abstract Object[] | Returns: an array of annotation-type objects.Returns the annotations associated with this member. |
| public abstract byte[] | |
| public abstract Object[] | Returns: an array of annotation-type objects.Returns the annotations associated with this member. |
| public CtClass | |
| public abstract String | |
| public abstract int | Returns: modifiers encoded withjavassist.Modifier.Obtains the modifiers of the member. |
| public abstract String | |
| public abstract String | |
| public boolean | Returns: true if the annotation is found, otherwise false.the annotation type. clz)Returns true if the class has the specified annotation type. |
| public abstract boolean | Returns: true if the annotation is found, otherwise false.the name of annotation type. annotationTypeName)Returns true if the class has the specified annotation type. |
| pack-priv void | |
| pack-priv final CtMember | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public String | |
| public boolean |
| declaringClass | back to summary |
|---|---|
| protected CtClass declaringClass | |
| next | back to summary |
|---|---|
| pack-priv CtMember next | |
| CtMember | back to summary |
|---|---|
| protected CtMember(CtClass clazz) | |
| extendToString | back to summary |
|---|---|
| protected abstract void extendToString(StringBuilder buffer) Invoked by | |
| getAnnotation | back to summary |
|---|---|
| public abstract Object getAnnotation(Class<?> annotationType) throws ClassNotFoundException Returns the annotation if the class has the specified annotation type.
For example, if an annotation | |
| getAnnotations | back to summary |
|---|---|
| public abstract Object[] getAnnotations() throws ClassNotFoundException Returns the annotations associated with this member.
For example, if an annotation
| |
| getAttribute | back to summary |
|---|---|
| public abstract byte[] getAttribute(String name) Obtains a user-defined attribute with the given name. If that attribute is not found in the class file, this method returns null. Note that an attribute is a data block specified by
the class file format.
See
| |
| getAvailableAnnotations | back to summary |
|---|---|
| public abstract Object[] getAvailableAnnotations() Returns the annotations associated with this member.
This method is equivalent to
| |
| getDeclaringClass | back to summary |
|---|---|
| public CtClass getDeclaringClass() Returns the class that declares this member. | |
| getGenericSignature | back to summary |
|---|---|
| public abstract String getGenericSignature() Returns the generic signature of the member. | |
| getModifiers | back to summary |
|---|---|
| public abstract int getModifiers() Obtains the modifiers of the member.
| |
| getName | back to summary |
|---|---|
| public abstract String getName() Obtains the name of the member. As for constructor names, see
| |
| getSignature | back to summary |
|---|---|
| public abstract String getSignature() Returns the character string representing the signature of the member.
If two members have the same signature (parameter types etc.),
| |
| hasAnnotation | back to summary |
|---|---|
| public boolean hasAnnotation(Class<?> clz) Returns true if the class has the specified annotation type.
| |
| hasAnnotation | back to summary |
|---|---|
| public abstract boolean hasAnnotation(String annotationTypeName) Returns true if the class has the specified annotation type.
| |
| nameReplaced | back to summary |
|---|---|
| pack-priv void nameReplaced() This method is invoked when setName() or replaceClassName() in CtClass is called.
| |
| next | back to summary |
|---|---|
| pack-priv final CtMember next() | |
| setAttribute | back to summary |
|---|---|
| public abstract void setAttribute(String name, byte[] data) Adds a user-defined attribute. The attribute is saved in the class file. Note that an attribute is a data block specified by
the class file format.
See
| |
| setGenericSignature | back to summary |
|---|---|
| public abstract void setGenericSignature(String sig) Sets the generic signature of the member.
| |
| setModifiers | back to summary |
|---|---|
| public abstract void setModifiers(int mod) Sets the encoded modifiers of the member.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| visibleFrom | back to summary |
|---|---|
| public boolean visibleFrom(CtClass clazz) Returns true if this member is accessible from the given class. | |
| Modifier and Type | Field and Description |
|---|---|
| private CtMember | |
| private CtMember | |
| private CtMember |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv CtMember | |
| pack-priv static int | |
| protected void | extendToString(StringBuilder buffer)
Implements abstract javassist. Invoked by |
| pack-priv CtMember | |
| public Object | getAnnotation(Class<?>
the annotation type. clz)Implements abstract javassist. Returns the annotation if the class has the specified annotation type. |
| public Object[] | getAnnotations()
Implements abstract javassist. Returns the annotations associated with this member. |
| public byte[] | getAttribute(String
attribute name name)Implements abstract javassist. Obtains a user-defined attribute with the given name. |
| public Object[] | getAvailableAnnotations()
Implements abstract javassist. Returns the annotations associated with this member. |
| public String | getGenericSignature()
Implements abstract javassist. Returns the generic signature of the member. |
| public int | getModifiers()
Implements abstract javassist. Obtains the modifiers of the member. |
| public String | |
| public String | getSignature()
Implements abstract javassist. Returns the character string representing the signature of the member. |
| public boolean | hasAnnotation(String
the name of annotation type. clz)Implements abstract javassist. Returns true if the class has the specified annotation type. |
| pack-priv CtMember | |
| pack-priv CtMember | |
| pack-priv CtMember | |
| pack-priv CtMember | |
| pack-priv void | |
| public void | setAttribute(String
attribute name name, byte[] attribute value data)Implements abstract javassist. Adds a user-defined attribute. |
| public void | setGenericSignature(String
a new generic signature. sig)Implements abstract javassist. Sets the generic signature of the member. |
| public void | setModifiers(int mod)
Implements abstract javassist. Sets the encoded modifiers of the member. |
| consTail | back to summary |
|---|---|
| private CtMember consTail | |
| fieldTail | back to summary |
|---|---|
| private CtMember fieldTail | |
| methodTail | back to summary |
|---|---|
| private CtMember methodTail | |
| Cache | back to summary |
|---|---|
| pack-priv Cache(CtClassType decl) | |
| addConstructor | back to summary |
|---|---|
| pack-priv void addConstructor(CtMember cons) | |
| addField | back to summary |
|---|---|
| pack-priv void addField(CtMember field) | |
| addMethod | back to summary |
|---|---|
| pack-priv void addMethod(CtMember method) | |
| consHead | back to summary |
|---|---|
| pack-priv CtMember consHead() | |
| count | back to summary |
|---|---|
| pack-priv static int count(CtMember head, CtMember tail) | |
| extendToString | back to summary |
|---|---|
| protected void extendToString(StringBuilder buffer) Implements abstract javassist. Doc from javassist. Invoked by
| |
| fieldHead | back to summary |
|---|---|
| pack-priv CtMember fieldHead() | |
| getAnnotation | back to summary |
|---|---|
| public Object getAnnotation(Class<?> clz) throws ClassNotFoundException Implements abstract javassist. Doc from javassist. Returns the annotation if the class has the specified annotation type.
For example, if an annotation | |
| getAnnotations | back to summary |
|---|---|
| public Object[] getAnnotations() throws ClassNotFoundException Implements abstract javassist. Doc from javassist. Returns the annotations associated with this member.
For example, if an annotation | |
| getAttribute | back to summary |
|---|---|
| public byte[] getAttribute(String name) Implements abstract javassist. Doc from javassist. Obtains a user-defined attribute with the given name. If that attribute is not found in the class file, this method returns null. Note that an attribute is a data block specified by
the class file format.
See | |
| getAvailableAnnotations | back to summary |
|---|---|
| public Object[] getAvailableAnnotations() Implements abstract javassist. Doc from javassist. Returns the annotations associated with this member.
This method is equivalent to | |
| getGenericSignature | back to summary |
|---|---|
| public String getGenericSignature() Implements abstract javassist. Doc from javassist. Returns the generic signature of the member.
| |
| getModifiers | back to summary |
|---|---|
| public int getModifiers() Implements abstract javassist. Doc from javassist. Obtains the modifiers of the member.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements abstract javassist. Doc from javassist. Obtains the name of the member. As for constructor names, see
| |
| getSignature | back to summary |
|---|---|
| public String getSignature() Implements abstract javassist. Doc from javassist. Returns the character string representing the signature of the member.
If two members have the same signature (parameter types etc.),
| |
| hasAnnotation | back to summary |
|---|---|
| public boolean hasAnnotation(String clz) Implements abstract javassist. Doc from javassist. Returns true if the class has the specified annotation type. | |
| lastCons | back to summary |
|---|---|
| pack-priv CtMember lastCons() | |
| lastField | back to summary |
|---|---|
| pack-priv CtMember lastField() | |
| lastMethod | back to summary |
|---|---|
| pack-priv CtMember lastMethod() | |
| methodHead | back to summary |
|---|---|
| pack-priv CtMember methodHead() | |
| remove | back to summary |
|---|---|
| pack-priv void remove(CtMember mem) | |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(String name, byte[] data) Implements abstract javassist. Doc from javassist. Adds a user-defined attribute. The attribute is saved in the class file. Note that an attribute is a data block specified by
the class file format.
See | |
| setGenericSignature | back to summary |
|---|---|
| public void setGenericSignature(String sig) Implements abstract javassist. Doc from javassist. Sets the generic signature of the member. | |
| setModifiers | back to summary |
|---|---|
| public void setModifiers(int mod) Implements abstract javassist. Doc from javassist. Sets the encoded modifiers of the member.
| |