|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.ClassFile.HCode
harpoon.IR.Bytecode.Code
public class 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/interfaces inherited from class harpoon.ClassFile.HCode |
---|
HCode.PrintCallback<HCE extends HCodeElement> |
Nested classes/interfaces inherited from interface harpoon.Util.Collections.Graph |
---|
Graph.Edge<N extends Graph.Node<N,E>,E extends Graph.Edge<N,E>>, Graph.Node<N extends Graph.Node<N,E>,E extends Graph.Edge<N,E>> |
Field Summary | |
---|---|
static String |
codename
The name of this code view. |
static boolean |
VERBOSE_BYTECODE_METHOD_CREATION
If turned on, we print a short message each time the bytecode representation for a method is created. |
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<Instr> |
elementArrayFactory()
Return an ArrayFactory for the HCodeElement s
composing this HCode . |
Constant |
getConstant(int index)
Look up a constant in the appropriate constant_pool. |
List<Instr> |
getElementsL()
Return an ordered list of the Bytecode.Instr s
making up this code view. |
Instr[] |
getLeafElements()
Return the 'leaves' of this code view; that is, the elements with no successors. |
List<Instr> |
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. |
Set<Instr> |
nodes()
Return the set of nodes comprising this Graph. |
Methods inherited from class harpoon.ClassFile.HCode |
---|
clone, elementIndexer, getElements, getElementsI, 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
public static boolean VERBOSE_BYTECODE_METHOD_CREATION
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<Instr> 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 List<Instr> getLeafElementsL()
public Instr[] getLeafElements()
HCode
getLeafElements
in class HCode
null
if this notion
is not applicable.public ArrayFactory<Instr> elementArrayFactory()
HCode
ArrayFactory
for the HCodeElement
s
composing this HCode
.
elementArrayFactory
in class HCode
public Set<Instr> nodes()
Graph
nodes
in interface Graph<Instr,harpoon.IR.Bytecode.InstrEdge>
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 |