| java.lang.Object javassist.CtMember
All known Subclasses: javassist.CtField, javassist.CtBehavior,
CtMember | abstract public class CtMember (Code) | | An instance of CtMember represents a field, a constructor,
or a method.
|
extendToString | abstract protected void extendToString(StringBuffer buffer)(Code) | | Invoked by
CtMember.toString() to add to the buffer and provide the
complete value. Subclasses should invoke this method, adding a
space before each token. The modifiers for the member are
provided first; subclasses should provide additional data such
as return type, field or method name, etc.
|
getAnnotations | abstract public Object[] getAnnotations() throws ClassNotFoundException(Code) | | Returns the annotations associated with this member.
For example, if an annotation @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.
an array of annotation-type objects. See Also: CtClass.getAnnotations |
getAttribute | abstract public byte[] getAttribute(String name)(Code) | | 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
javassist.bytecode.AttributeInfo .
Parameters: name - attribute name |
getDeclaringClass | public CtClass getDeclaringClass()(Code) | | Returns the class that declares this member.
|
getModifiers | abstract public int getModifiers()(Code) | | Obtains the modifiers of the member.
modifiers encoded withjavassist.Modifier . See Also: Modifier |
getName | abstract public String getName()(Code) | | Obtains the name of the member.
As for constructor names, see getName()
in CtConstructor .
See Also: CtConstructor.getName |
getSignature | abstract public String getSignature()(Code) | | Returns the character string representing the signature of the member.
If two members have the same signature (parameter types etc.),
getSignature() returns the same string.
|
setAttribute | abstract public void setAttribute(String name, byte[] data)(Code) | | 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
javassist.bytecode.AttributeInfo .
Parameters: name - attribute name Parameters: data - attribute value |
setModifiers | abstract public void setModifiers(int mod)(Code) | | Sets the encoded modifiers of the member.
See Also: Modifier |
visibleFrom | public boolean visibleFrom(CtClass clazz)(Code) | | Returns true if this member is accessible from the given class.
|
|
|