|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fife.rsta.ac.java.classreader.attributes.AttributeInfo
org.fife.rsta.ac.java.classreader.attributes.Code
public class Code
A variable-length attribute used in the attributes table of
MethodInfo structures. A Code attribute contains the
JVM instructions and auxiliary information for a single method, instance
initialization method, or class or interface initialization method. Every
JVM implementation must recognize Code attributes. If the
method is either native or abstract, its
MethodInfo structure must not have a Code
attribute. Otherwise, its MethodInfo structure must have
exactly one Code attribute.
| Field Summary |
|---|
| Fields inherited from class org.fife.rsta.ac.java.classreader.attributes.AttributeInfo |
|---|
attributeNameIndex |
| Constructor Summary | |
|---|---|
Code(MethodInfo mi)
Constructor. |
|
| Method Summary | |
|---|---|
int |
getCodeLength()
Returns the length of the code array, in bytes. |
int |
getMaxLocals()
Returns the number of local variables in the local variable array allocated upon invocation of this method, including the local variables used to pass parameters to the method on invocation. |
int |
getMaxStack()
Returns the maximum depth of the operand stack of this method at any point during its execution. |
MethodInfo |
getMethodInfo()
Returns the method containing this code. |
String |
getParameterName(int index)
If debugging was enabled during compilation, this method returns the name of the given parameter to this method. |
static Code |
read(MethodInfo mi,
DataInputStream in)
Reads a Code attribute from an input stream. |
| Methods inherited from class org.fife.rsta.ac.java.classreader.attributes.AttributeInfo |
|---|
getClassFile, getName, readUnsupportedAttribute, skipBytes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Code(MethodInfo mi)
mi - Information on the parent method.| Method Detail |
|---|
public int getCodeLength()
public int getMaxLocals()
The greatest local variable index for a value of type long
or double is maxLocals-2. The greatest local
variable index for a value of any other type is maxLocals-1.
public int getMaxStack()
public MethodInfo getMethodInfo()
public String getParameterName(int index)
null
is returned.
index - The index of the parameter.
null.
public static Code read(MethodInfo mi,
DataInputStream in)
throws IOException
Code attribute from an input stream.
mi - The parent method.in - The input stream.
Code attribute.
IOException - If an IO error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||