Class MemberInfo
- java.lang.Object
-
- org.fife.rsta.ac.java.classreader.MemberInfo
-
- Direct Known Subclasses:
FieldInfo,MethodInfo
public abstract class MemberInfo extends java.lang.ObjectBase class for information about members (fields and methods).- Version:
- 1.0
- See Also:
FieldInfo,MethodInfo
-
-
Field Summary
Fields Modifier and Type Field Description private intaccessFlagsA mask of flags used to denote access permission to and properties of this method.protected ClassFilecfThe class file in which this method is defined.private booleandeprecatedWhether this member is deprecated.static java.lang.StringDEPRECATEDAttribute marking a member as deprecated.static java.lang.StringRUNTIME_VISIBLE_ANNOTATIONSAttribute containing runtime-visible annotations.static java.lang.StringSIGNATUREAttribute containing index of the member's signature.
-
Constructor Summary
Constructors Modifier Constructor Description protectedMemberInfo(ClassFile cf, int accessFlags)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intgetAccessFlags()Returns the access flags for this field.ClassFilegetClassFile()Returns the parent class file.abstract java.lang.StringgetDescriptor()Returns the descriptor of this member.abstract java.lang.StringgetName()Returns the name of this member.booleanisDeprecated()Returns whether this member is deprecated.booleanisFinal()Returns whether this member is final.booleanisStatic()Returns whether this member is static.protected AttributeInforeadAttribute(java.io.DataInputStream in, java.lang.String attrName, int attrLength)Reads attributes common to all members.
-
-
-
Field Detail
-
cf
protected ClassFile cf
The class file in which this method is defined.
-
accessFlags
private int accessFlags
A mask of flags used to denote access permission to and properties of this method.
-
deprecated
private boolean deprecated
Whether this member is deprecated.
-
DEPRECATED
public static final java.lang.String DEPRECATED
Attribute marking a member as deprecated.- See Also:
- Constant Field Values
-
SIGNATURE
public static final java.lang.String SIGNATURE
Attribute containing index of the member's signature.- See Also:
- Constant Field Values
-
RUNTIME_VISIBLE_ANNOTATIONS
public static final java.lang.String RUNTIME_VISIBLE_ANNOTATIONS
Attribute containing runtime-visible annotations.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MemberInfo
protected MemberInfo(ClassFile cf, int accessFlags)
Constructor.- Parameters:
cf- The class file defining this member.
-
-
Method Detail
-
getAccessFlags
public int getAccessFlags()
Returns the access flags for this field.- Returns:
- The access flags, as a bit field.
- See Also:
AccessFlags
-
getClassFile
public ClassFile getClassFile()
Returns the parent class file.- Returns:
- The parent class file.
-
getName
public abstract java.lang.String getName()
Returns the name of this member.- Returns:
- The name of this member.
-
isDeprecated
public boolean isDeprecated()
Returns whether this member is deprecated.- Returns:
- Whether this member is deprecated.
-
getDescriptor
public abstract java.lang.String getDescriptor()
Returns the descriptor of this member.- Returns:
- The descriptor of this member.
-
isFinal
public boolean isFinal()
Returns whether this member is final.- Returns:
- Whether this member is final.
-
isStatic
public boolean isStatic()
Returns whether this member is static.- Returns:
- Whether this member is static.
-
readAttribute
protected AttributeInfo readAttribute(java.io.DataInputStream in, java.lang.String attrName, int attrLength) throws java.io.IOException
Reads attributes common to all members. If the specified attribute is not common to members, the attribute returned is an "unsupported" attribute.- Parameters:
in- The input stream to read from.attrName- The attribute name.attrLength- The attribute length.- Returns:
- The attribute, or
nullif it was purposely skipped for some reason (known to be useless for our purposes, etc.). - Throws:
java.io.IOException- If an IO error occurs.
-
-