javassist
public abstract class CtMember extends Object
CtMember
represents a field, a constructor,
or a method.
Method Summary | |
---|---|
abstract Object[] | getAnnotations()
Returns the annotations associated with this member.
|
abstract byte[] | getAttribute(String name)
Obtains a user-defined attribute with the given name.
|
abstract Object[] | getAvailableAnnotations()
Returns the annotations associated with this member.
|
CtClass | getDeclaringClass()
Returns the class that declares this member. |
abstract int | getModifiers()
Obtains the modifiers of the member.
|
abstract String | getName()
Obtains the name of the member.
|
abstract String | getSignature()
Returns the character string representing the signature of the member.
|
abstract void | setAttribute(String name, byte[] data)
Adds a user-defined attribute. |
abstract void | setModifiers(int mod)
Sets the encoded modifiers of the member.
|
String | toString() |
boolean | visibleFrom(CtClass clazz)
Returns true if this member is accessible from the given class. |
@Author
is associated
with this member, the returned array contains an Author
object. The member values can be obtained by calling methods on
the Author
object.
Returns: an array of annotation-type objects.
See Also: getAnnotations
Note that an attribute is a data block specified by the class file format. See AttributeInfo.
Parameters: name attribute name
getAnnotations()
except that, if any annotations are not on the classpath,
they are not included in the returned array.
Returns: an array of annotation-type objects.
Since: 3.3
See Also: getAnnotations getAvailableAnnotations
Returns: modifiers encoded with
javassist.Modifier
.
See Also: Modifier
As for constructor names, see getName()
in CtConstructor
.
See Also: getName
getSignature()
returns the same string.Note that an attribute is a data block specified by the class file format. See AttributeInfo.
Parameters: name attribute name data attribute value
See Also: Modifier