|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.go.trove.classfile.MethodInfo
This class corresponds to the method_info data structure as defined in section 4.6 of The Java Virtual Machine Specification. To make it easier to create bytecode for a method's CodeAttr, the CodeBuilder class is provided.
ClassFile,
CodeBuilder| Method Summary | |
void |
addAttribute(Attribute attr)
|
void |
addException(java.lang.String className)
Add a declared exception that this method may throw. |
AccessFlags |
getAccessFlags()
Returns a copy of this method's access flags. |
Attribute[] |
getAttributes()
|
ClassFile |
getClassFile()
Returns the parent ClassFile for this MethodInfo. |
CodeAttr |
getCodeAttr()
Returns a CodeAttr object used to manipulate the method code body, or null if this method is abstract. |
ConstantUTFInfo |
getDescriptorConstant()
Returns a constant from the constant pool with this method's type descriptor string. |
java.lang.String[] |
getExceptions()
Returns the exceptions that this method is declared to throw. |
int |
getLength()
Returns the length (in bytes) of this object in the class file. |
MethodDescriptor |
getMethodDescriptor()
Returns a MethodDescriptor which describes return and parameter types of this method. |
java.lang.String |
getName()
Returns the name of this method. |
ConstantUTFInfo |
getNameConstant()
Returns a constant from the constant pool with this method's name. |
boolean |
isDeprecated()
|
boolean |
isSynthetic()
|
void |
markDeprecated()
Mark this method as being deprecated by adding a special attribute. |
void |
markSynthetic()
Mark this method as being synthetic by adding a special attribute. |
java.lang.String |
toString()
|
void |
writeTo(java.io.DataOutput dout)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public ClassFile getClassFile()
public java.lang.String getName()
public MethodDescriptor getMethodDescriptor()
public AccessFlags getAccessFlags()
public ConstantUTFInfo getNameConstant()
public ConstantUTFInfo getDescriptorConstant()
TypeDescriptorpublic java.lang.String[] getExceptions()
public CodeAttr getCodeAttr()
public boolean isSynthetic()
public boolean isDeprecated()
public void addException(java.lang.String className)
public void markSynthetic()
public void markDeprecated()
public void addAttribute(Attribute attr)
public Attribute[] getAttributes()
public int getLength()
public void writeTo(java.io.DataOutput dout)
throws java.io.IOException
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||