|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fife.rsta.ac.java.classreader.MemberInfo
org.fife.rsta.ac.java.classreader.MethodInfo
public class MethodInfo
Implementation of the "method_info" structure as defined in
the JVM specification.
| Field Summary | |
|---|---|
static String |
CODE
|
static String |
EXCEPTIONS
|
static String |
SIGNATURE
|
| Fields inherited from class org.fife.rsta.ac.java.classreader.MemberInfo |
|---|
cf, DEPRECATED |
| Fields inherited from interface org.fife.rsta.ac.java.classreader.AccessFlags |
|---|
ACC_ABSTRACT, ACC_ANNOTATION, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_VOLATILE |
| Constructor Summary | |
|---|---|
MethodInfo(ClassFile cf,
int accessFlags,
int nameIndex,
int descriptorIndex)
Constructor. |
|
| Method Summary | |
|---|---|
AttributeInfo |
getAttribute(int index)
Returns the specified attribute. |
int |
getAttributeCount()
Returns the number of attributes of this field. |
String |
getDescriptor()
Returns the descriptor of this member. |
String |
getName()
Returns the name of this member. |
String |
getNameAndParameters()
Returns the name and parameters of this method, in the form performAction(String, int, Runnable). |
int |
getParameterCount()
Returns the number of parameters this method takes. |
String |
getParameterName(int index)
If debugging was enabled during compilation, this method returns the name of the given parameter to this method. |
String |
getParameterType(int index,
boolean fullyQualified)
Returns a string representing the type of a parameter to this method. |
String[] |
getParameterTypes()
Returns an array if strings representing the types of all parameters to this method. |
String |
getReturnTypeString()
Returns the return type of this method. |
String |
getSignature()
Returns the signature of this method, as determined from its method descriptor. |
boolean |
isAbstract()
Returns whether this method is abstract. |
boolean |
isConstructor()
Returns whether this method is a constructor. |
boolean |
isNative()
Returns whether this method is native. |
boolean |
isStatic()
Returns whether this method is static. |
static MethodInfo |
read(ClassFile cf,
DataInputStream in)
Reads a MethodInfo from an input stream. |
| Methods inherited from class org.fife.rsta.ac.java.classreader.MemberInfo |
|---|
getAccessFlags, getClassFile, isDeprecated, isFinal, readAttribute |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CODE
public static final String EXCEPTIONS
public static final String SIGNATURE
| Constructor Detail |
|---|
public MethodInfo(ClassFile cf,
int accessFlags,
int nameIndex,
int descriptorIndex)
cf - The class file defining this method.| Method Detail |
|---|
public AttributeInfo getAttribute(int index)
index - The index of the attribute.
public int getAttributeCount()
public String getDescriptor()
getDescriptor in class MemberInfopublic String getName()
getName in class MemberInfopublic String getNameAndParameters()
performAction(String, int, Runnable).
public int getParameterCount()
getParameterTypes(),
getParameterType(int, boolean)public String getParameterName(int index)
null
is returned.
index - The index of the parameter.
null.
public String getParameterType(int index,
boolean fullyQualified)
index - The index of the parameter.fullyQualified - Whether the returned type should be fully
qualified. Note that if fully qualified information is not
available for the parameters to this method, this parameter will
be ignored (but I'm not sure that ever happens).
getParameterCount(),
getParameterTypes()public String[] getParameterTypes()
getParameterCount(),
getParameterType(int, boolean)public String getReturnTypeString()
public String getSignature()
public boolean isAbstract()
public boolean isConstructor()
public boolean isNative()
public boolean isStatic()
isStatic in class MemberInfo
public static MethodInfo read(ClassFile cf,
DataInputStream in)
throws IOException
MethodInfo from an input stream.
cf - The class file defining the method.in - The input stream to read from.
IOException - If an IO error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||