|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.quilt.cl.GraphTransformer
Build the control flow graph for a method, apply an arbitrary number of GraphXformers to it, and then collapse the graph back to an instruction list. Exception handlers are collected from the control flow graph and made available to callers.
XXX Debug statements should be removed when code is definitely stable. XXX
Constructor Summary | |
GraphTransformer(java.util.List gxf)
Creates method control flow graphs, applies application- specific transforms, and then collapses the graph to produce a new instruction list. |
Method Summary | |
protected BytecodeCollector |
collapseGraph(ControlFlowGraph graph)
Collapse a method control flow graph, writing bytecode back into the MethodGen data structures. |
org.apache.bcel.generic.CodeExceptionGen[] |
getExceptionHandlers()
Returns array of exception handlers, empty if the instruction list was null or there were no exception handlers. |
static boolean |
hasInbound(org.apache.bcel.generic.InstructionHandle ih)
Whether this instruction is target of branch instruction or starts catch block. |
protected ControlFlowGraph |
makeGraph(org.apache.bcel.generic.ClassGen clazz,
org.apache.bcel.generic.MethodGen method)
Build the graph for the method. |
org.apache.bcel.generic.InstructionList |
xform(org.apache.bcel.generic.ClassGen clazz,
org.apache.bcel.generic.MethodGen method)
Build a control flow graph for a method's instruction list, apply any transformers to it, and collapse the graph into a new instruction list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GraphTransformer(java.util.List gxf)
gxf
- List of application-specific graph transformers.Method Detail |
public org.apache.bcel.generic.InstructionList xform(org.apache.bcel.generic.ClassGen clazz, org.apache.bcel.generic.MethodGen method)
clazz
- Class being transformed.method
- The method being transformed.
public org.apache.bcel.generic.CodeExceptionGen[] getExceptionHandlers()
protected final ControlFlowGraph makeGraph(org.apache.bcel.generic.ClassGen clazz, org.apache.bcel.generic.MethodGen method)
clazz
- Class being transformed in bcel ClassGen.public static final boolean hasInbound(org.apache.bcel.generic.InstructionHandle ih)
ih
- Handle on instruction.
protected final BytecodeCollector collapseGraph(ControlFlowGraph graph)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |