org.apache.bcel.verifier.structurals
public class Subroutines extends Object
Version: $Id: Subroutines.java 386056 2006-03-15 11:31:56Z tcurdt $
See Also: getTopLevel
Nested Class Summary | |
---|---|
class | Subroutines.SubroutineImpl
This inner class implements the Subroutine interface. |
Field Summary | |
---|---|
static Integer | BLACK |
static Integer | GRAY |
Hashtable | subroutines
The Hashtable containing the subroutines found.
|
Subroutine | TOPLEVEL
This is referring to a special subroutine, namely the
top level. |
static Integer | WHITE |
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).
|
static InstructionHandle[] | getSuccessors(InstructionHandle instruction)
A utility method that calculates the successors of a given InstructionHandle
in the same 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.
|
void | noRecursiveCalls(Subroutine sub, Set set)
This (recursive) utility method makes sure that
no subroutine is calling a subroutine
that uses the same local variable for the RET as themselves
(recursively).
|
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. |
Parameters: mg A MethodGen object representing method to create the Subroutine objects of.
See Also: getTopLevel
See Also: getEnteringJsrInstructions getLeavingRET
Throws: StructuralCodeConstraintException if the above constraint is not satisfied.
See Also: getSubroutine getTopLevel