org.apache.bcel.verifier.structurals

Class ControlFlowGraph.InstructionContextImpl

private class ControlFlowGraph.InstructionContextImpl extends Object implements InstructionContext

Objects of this class represent a node in a ControlFlowGraph. These nodes are instructions, not basic blocks.
Constructor Summary
InstructionContextImpl(InstructionHandle inst)
Creates an InstructionHandleImpl object from an InstructionHandle.
Method Summary
booleanexecute(Frame inFrame, ArrayList execPreds, InstConstraintVisitor icv, ExecutionVisitor ev)
"Merges in" (vmspec2, page 146) the "incoming" frame situation; executes the instructions symbolically and therefore calculates the "outgoing" frame situation.
ExceptionHandler[]getExceptionHandlers()
Returns the exception handlers of this instruction.
FramegetInFrame()
InstructionHandlegetInstruction()
FramegetOutFrame(ArrayList execChain)
Returns a clone of the "outgoing" frame situation with respect to the given ExecutionChain.
InstructionContext[]getSuccessors()
intgetTag()
voidsetTag(int tag)
StringtoString()
Returns a simple String representation of this InstructionContext.

Constructor Detail

InstructionContextImpl

public InstructionContextImpl(InstructionHandle inst)
Creates an InstructionHandleImpl object from an InstructionHandle. Creation of one per InstructionHandle suffices. Don't create more.

Method Detail

execute

public boolean execute(Frame inFrame, ArrayList execPreds, InstConstraintVisitor icv, ExecutionVisitor ev)
"Merges in" (vmspec2, page 146) the "incoming" frame situation; executes the instructions symbolically and therefore calculates the "outgoing" frame situation. Returns: True iff the "incoming" frame situation changed after merging with "inFrame". The execPreds ArrayList must contain the InstructionContext objects executed so far in the correct order. This is just one execution path [out of many]. This is needed to correctly "merge" in the special case of a RET's successor. The InstConstraintVisitor and ExecutionVisitor instances must be set up correctly.

Returns: true - if and only if the "outgoing" frame situation changed from the one before execute()ing.

getExceptionHandlers

public ExceptionHandler[] getExceptionHandlers()
Returns the exception handlers of this instruction.

getInFrame

public Frame getInFrame()

getInstruction

public InstructionHandle getInstruction()

getOutFrame

public Frame getOutFrame(ArrayList execChain)
Returns a clone of the "outgoing" frame situation with respect to the given ExecutionChain.

getSuccessors

public InstructionContext[] getSuccessors()

getTag

public int getTag()

setTag

public void setTag(int tag)

toString

public String toString()
Returns a simple String representation of this InstructionContext.