|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavassist.CtMember
public abstract class CtMember
An instance of CtMember
represents a field, a constructor,
or a method.
Method Summary | |
---|---|
abstract java.lang.Object[] |
getAnnotations()
Returns the annotations associated with this member. |
abstract byte[] |
getAttribute(java.lang.String name)
Obtains a user-defined attribute with the given name. |
abstract java.lang.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 java.lang.String |
getName()
Obtains the name of the member. |
abstract java.lang.String |
getSignature()
Returns the character string representing the signature of the member. |
abstract void |
setAttribute(java.lang.String name,
byte[] data)
Adds a user-defined attribute. |
abstract void |
setModifiers(int mod)
Sets the encoded modifiers of the member. |
java.lang.String |
toString()
|
boolean |
visibleFrom(CtClass clazz)
Returns true if this member is accessible from the given class. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public CtClass getDeclaringClass()
public boolean visibleFrom(CtClass clazz)
public abstract int getModifiers()
javassist.Modifier
.Modifier
public abstract void setModifiers(int mod)
Modifier
public abstract java.lang.Object[] getAnnotations() throws java.lang.ClassNotFoundException
@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.
java.lang.ClassNotFoundException
CtClass.getAnnotations()
public abstract java.lang.Object[] getAvailableAnnotations()
getAnnotations()
except that, if any annotations are not on the classpath,
they are not included in the returned array.
getAnnotations()
,
CtClass.getAvailableAnnotations()
public abstract java.lang.String getName()
As for constructor names, see getName()
in CtConstructor
.
CtConstructor.getName()
public abstract java.lang.String getSignature()
getSignature()
returns the same string.
public abstract byte[] getAttribute(java.lang.String name)
Note that an attribute is a data block specified by
the class file format.
See AttributeInfo
.
name
- attribute namepublic abstract void setAttribute(java.lang.String name, byte[] data)
Note that an attribute is a data block specified by
the class file format.
See AttributeInfo
.
name
- attribute namedata
- attribute value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |