|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--harpoon.ClassFile.HCode | +--harpoon.IR.Bytecode.Code
Bytecode.Code
is a code view that exposes the
raw java classfile bytecodes.
HCode
Nested Class Summary | |
static class |
Code.ExceptionEntry
Represents exception handlers in this code view. |
Nested classes inherited from class harpoon.ClassFile.HCode |
HCode.PrintCallback |
Field Summary | |
static String |
codename
The name of this code view. |
Constructor Summary | |
Code(HMethod parent,
MethodInfo methodinfo)
Constructor. |
Method Summary | |
HCodeAndMaps |
clone(HMethod newMethod)
Clone this code representation. |
static HCodeFactory |
codeFactory()
Return an HCodeFactory for Bytecode form. |
ArrayFactory |
elementArrayFactory()
Return an ArrayFactory for the HCodeElement s
composing this HCode . |
Constant |
getConstant(int index)
Look up a constant in the appropriate constant_pool. |
HCodeElement[] |
getElements()
Return an ordered list of the component objects making up this code view. |
Enumeration |
getElementsE()
Return an Enumeration of the component objects making up this code view. |
Iterator |
getElementsI()
Return an Iterator over the component objects making up this code view. |
List |
getElementsL()
Return an ordered list of the Bytecode.Instr s
making up this code view. |
HCodeElement[] |
getLeafElements()
Return the 'leaves' of this code view; that is, the elements with no successors. |
List |
getLeafElementsL()
|
int |
getMaxLocals()
Get the number of local variables used in this method, including the parameters passed to the method on invocation. |
int |
getMaxStack()
Get the maximum number of words on the operand stack at any point during execution of this method. |
HMethod |
getMethod()
Return the HMethod this codeview
belongs to. |
String |
getName()
Return the name of this code view, "bytecode" . |
Code.ExceptionEntry[] |
getTryBlocks()
Get an array with the try-catch blocks/handlers for this bytecode. |
Methods inherited from class harpoon.ClassFile.HCode |
clone, elementIndexer, getRootElement, print, print, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String codename
Constructor Detail |
public Code(HMethod parent, MethodInfo methodinfo)
Method Detail |
public HCodeAndMaps clone(HMethod newMethod)
clone
in class HCode
public HMethod getMethod()
HMethod
this codeview
belongs to.
getMethod
in class HCode
public String getName()
"bytecode"
.
getName
in class HCode
"bytecode"
.public List getElementsL()
Bytecode.Instr
s
making up this code view. The first instruction to be
executed is in element 0 of the array.
getElementsL
in class HCode
public HCodeElement[] getElements()
HCode
HCodeElement
array.
Either getElementsI()
or getElementsE()
must have been implemented for the default implementation to work
properly.
getElements
in class HCode
Instr
public Enumeration getElementsE()
HCode
Implementations must implement at least one of
getElementsE()
, or getElementsI()
.
getElementsE
in class HCode
Instr
public Iterator getElementsI()
HCode
Implementations must implement at least one of
getElementsE()
, or getElementsI()
.
getElementsI
in class HCode
public List getLeafElementsL()
public HCodeElement[] getLeafElements()
HCode
getLeafElements
in class HCode
null
if this notion
is not applicable.public ArrayFactory elementArrayFactory()
HCode
ArrayFactory
for the HCodeElement
s
composing this HCode
.
elementArrayFactory
in class HCode
public int getMaxLocals()
public int getMaxStack()
public Code.ExceptionEntry[] getTryBlocks()
public Constant getConstant(int index)
public static HCodeFactory codeFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |