|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mvel2.asm.tree.analysis.Analyzer<V>
V - type of the Value used for the analysis.public class Analyzer<V extends Value>
A semantic bytecode analyzer. This class does not fully check that JSR and RET instructions are valid.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
Analyzer(Interpreter<V> interpreter)
Constructs a new Analyzer. |
|
| Method Summary | |
|---|---|
Frame<V>[] |
analyze(String owner,
MethodNode m)
Analyzes the given method. |
Frame<V>[] |
getFrames()
Returns the symbolic stack frame for each instruction of the last recently analyzed method. |
List<TryCatchBlockNode> |
getHandlers(int insn)
Returns the exception handlers for the given instruction. |
protected void |
init(String owner,
MethodNode m)
Initializes this analyzer. |
protected void |
newControlFlowEdge(int insn,
int successor)
Creates a control flow graph edge. |
protected boolean |
newControlFlowExceptionEdge(int insn,
int successor)
Creates a control flow graph edge corresponding to an exception handler. |
protected boolean |
newControlFlowExceptionEdge(int insn,
TryCatchBlockNode tcb)
Creates a control flow graph edge corresponding to an exception handler. |
protected Frame<V> |
newFrame(Frame<? extends V> src)
Constructs a new frame that is identical to the given frame. |
protected Frame<V> |
newFrame(int nLocals,
int nStack)
Constructs a new frame with the given size. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Analyzer(Interpreter<V> interpreter)
Analyzer.
interpreter - the interpreter to be used to symbolically interpret the
bytecode instructions.| Method Detail |
|---|
public Frame<V>[] analyze(String owner,
MethodNode m)
throws AnalyzerException
owner - the internal name of the class to which the method belongs.m - the method to be analyzed.
AnalyzerException - if a problem occurs during the analysis.public Frame<V>[] getFrames()
public List<TryCatchBlockNode> getHandlers(int insn)
insn - the index of an instruction of the last recently analyzed
method.
TryCatchBlockNode objects.
protected void init(String owner,
MethodNode m)
throws AnalyzerException
owner - the internal name of the class to which the method belongs.m - the method to be analyzed.
AnalyzerException - if a problem occurs.
protected Frame<V> newFrame(int nLocals,
int nStack)
nLocals - the maximum number of local variables of the frame.nStack - the maximum stack size of the frame.
protected Frame<V> newFrame(Frame<? extends V> src)
src - a frame.
protected void newControlFlowEdge(int insn,
int successor)
analyze method during its visit of the method's code).
insn - an instruction index.successor - index of a successor instruction.
protected boolean newControlFlowExceptionEdge(int insn,
int successor)
analyze method during its visit
of the method's code).
insn - an instruction index.successor - index of a successor instruction.
protected boolean newControlFlowExceptionEdge(int insn,
TryCatchBlockNode tcb)
newControlFlowExceptionEdge(int, int). It can be overridden in order to
construct the control flow graph of a method (this method is called by
the analyze method during its visit of the method's
code).
insn - an instruction index.tcb - TryCatchBlockNode corresponding to this edge.
newControlFlowExceptionEdge(int, int).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||