|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.bcel.verifier.structurals.Subroutines
public class Subroutines
Instances of this class contain information about the subroutines found in a code array of a method. This implementation considers the top-level (the instructions reachable without a JSR or JSR_W starting off from the first instruction in a code array of a method) being a special subroutine; see getTopLevel() for that. Please note that the definition of subroutines in the Java Virtual Machine Specification, Second Edition is somewhat incomplete. Therefore, JustIce uses an own, more rigid notion. Basically, a subroutine is a piece of code that starts at the target of a JSR of JSR_W instruction and ends at a corresponding RET instruction. Note also that the control flow of a subroutine may be complex and non-linear; and that subroutines may be nested. JustIce also mandates subroutines not to be protected by exception handling code (for the sake of control flow predictability). To understand JustIce's notion of subroutines, please read TODO: refer to the paper.
getTopLevel()
Field Summary | |
---|---|
Subroutine |
TOPLEVEL
This is referring to a special subroutine, namely the top level. |
Constructor Summary | |
---|---|
Subroutines(MethodGen mg)
Constructor. |
Method Summary | |
---|---|
Subroutine |
getSubroutine(InstructionHandle leader)
Returns the Subroutine object associated with the given leader (that is, the first instruction of the subroutine). |
Subroutine |
getTopLevel()
For easy handling, the piece of code that is not a subroutine, the top-level, is also modeled as a Subroutine object. |
Subroutine |
subroutineOf(InstructionHandle any)
Returns the subroutine object associated with the given instruction. |
String |
toString()
Returns a String representation of this object; merely for debugging puposes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final Subroutine TOPLEVEL
Constructor Detail |
---|
public Subroutines(MethodGen mg)
mg
- A MethodGen object representing method to
create the Subroutine objects of.Method Detail |
---|
public Subroutine getSubroutine(InstructionHandle leader)
getTopLevel()
public Subroutine subroutineOf(InstructionHandle any)
getSubroutine(InstructionHandle)
,
getTopLevel()
public Subroutine getTopLevel()
Subroutine.getEnteringJsrInstructions()
,
Subroutine.getLeavingRET()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |