|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--javar.methods.Method
This class represents a method inside of a class
| Nested Class Summary |
| Nested classes inherited from class javar.code.Code |
Code.CodeHelper |
| Field Summary | |
static String |
CONSTRUCTOR_NAME
|
| Constructor Summary | |
Method(ConstantPool p)
Constructor |
|
| Method Summary | |
void |
addAttribute(Attribute attr)
This will add an attribute to the class. |
void |
addCommand(int index,
Command c)
This will add a new command into the mix. |
int |
getAccessFlags()
This will get the access flags for this class |
List |
getArguments()
This will get all the arguments that this class takes |
byte[] |
getByteCode()
This will return the byteCode for this function |
int |
getName()
This will return the name of the method |
String |
getNameAsString()
This will return the name of the method |
List |
getOperations()
This will get a list of Command objects that represent operations that can be executed. |
String |
getReturnValue()
This will get the return value of a class. |
boolean |
isConstructor()
This is a convience method that determines if this method is a constructor or not. |
Iterator |
listExceptions()
This will list all of the exceptions that this method throws. |
void |
load(DataInputStream in)
This will load the data for a method |
void |
setAccessFlags(int flags)
This will set the accessFlags() |
void |
setDescriptorIndex(int index)
This will set the index of the descriptor. |
void |
setName(int index)
This will set the index of the name. |
byte[] |
toBytes()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String CONSTRUCTOR_NAME
| Constructor Detail |
public Method(ConstantPool p)
| Method Detail |
public void setAccessFlags(int flags)
flags - The new access flagspublic int getAccessFlags()
public void setName(int index)
index - The name indexpublic void setDescriptorIndex(int index)
index - The descriptor indexpublic void addAttribute(Attribute attr)
attr - The attribute to add
public Iterator listExceptions()
throws JavarParseException
JavarParseException - If there is an error parsing the
exception listpublic byte[] toBytes()
public void load(DataInputStream in)
throws JavarParseException
JavarParseExceptionpublic int getName()
public String getNameAsString()
public boolean isConstructor()
public List getOperations()
public void addCommand(int index,
Command c)
throws JavarIOException
index - The index of the code to insert the command
JavarIOException
public List getArguments()
throws JavarParseException
JavarParseException - If there is an error during the parse of arguments.
public String getReturnValue()
throws JavarParseException
JavarParseException - If there is an error parsing the return value.public byte[] getByteCode()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||