|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.bcel.verifier.structurals.Subroutines.SubroutineImpl
private class Subroutines.SubroutineImpl
This inner class implements the Subroutine interface.
| Field Summary | |
|---|---|
private java.util.Set |
instructions
The instructions that belong to this subroutine. |
private int |
localVariable
The Local Variable slot where the first instruction of this subroutine (an ASTORE) stores the JsrInstruction's ReturnAddress in and the RET of this subroutine operates on. |
private java.util.Set |
theJSRs
The JSR or JSR_W instructions that define this subroutine by targeting it. |
private InstructionHandle |
theRET
The RET instruction that leaves this subroutine. |
private static int |
UNSET
UNSET, a symbol for an uninitialized localVariable field. |
| Constructor Summary | |
|---|---|
Subroutines.SubroutineImpl()
The default constructor. |
|
| Method Summary | |
|---|---|
private void |
_getRecursivelyAccessedLocalsIndicesHelper(java.util.Set s,
Subroutine[] subs)
A recursive helper method for getRecursivelyAccessedLocalsIndices(). |
void |
addEnteringJsrInstruction(InstructionHandle jsrInst)
Adds a new JSR or JSR_W that has this subroutine as its target. |
(package private) void |
addInstruction(InstructionHandle ih)
|
boolean |
contains(InstructionHandle inst)
Returns if the given InstructionHandle refers to an instruction that is part of this subroutine. |
int[] |
getAccessedLocalsIndices()
Returns an int[] containing the indices of the local variable slots accessed by this Subroutine (read-accessed, write-accessed or both); local variables referenced by subroutines of this subroutine are not included. |
InstructionHandle[] |
getEnteringJsrInstructions()
Returns all the JsrInstructions that have the first instruction of this subroutine as their target. |
InstructionHandle[] |
getInstructions()
Returns all instructions that together form this subroutine. |
InstructionHandle |
getLeavingRET()
Returns the one and only RET that leaves the subroutine. |
int[] |
getRecursivelyAccessedLocalsIndices()
Returns an int[] containing the indices of the local variable slots accessed by this Subroutine (read-accessed, write-accessed or both); local variables referenced by subroutines of this subroutine are included. |
(package private) void |
setLeavingRET()
Sets the leaving RET instruction. |
(package private) void |
setLocalVariable(int i)
|
Subroutine[] |
subSubs()
Returns the subroutines that are directly called from this subroutine. |
java.lang.String |
toString()
Returns a String representation of this object, merely for debugging purposes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final int UNSET
private int localVariable
private java.util.Set instructions
private java.util.Set theJSRs
private InstructionHandle theRET
| Constructor Detail |
|---|
public Subroutines.SubroutineImpl()
| Method Detail |
|---|
public boolean contains(InstructionHandle inst)
Subroutine
contains in interface SubroutineSubroutine.getInstructions()public java.lang.String toString()
toString in class java.lang.Objectvoid setLeavingRET()
public InstructionHandle[] getEnteringJsrInstructions()
Subroutine
getEnteringJsrInstructions in interface Subroutinepublic void addEnteringJsrInstruction(InstructionHandle jsrInst)
public InstructionHandle getLeavingRET()
Subroutine
getLeavingRET in interface SubroutineSubroutinespublic InstructionHandle[] getInstructions()
Subroutine
getInstructions in interface Subroutinevoid addInstruction(InstructionHandle ih)
public int[] getRecursivelyAccessedLocalsIndices()
Subroutine
getRecursivelyAccessedLocalsIndices in interface SubroutineSubroutine.getAccessedLocalsIndices()
private void _getRecursivelyAccessedLocalsIndicesHelper(java.util.Set s,
Subroutine[] subs)
getRecursivelyAccessedLocalsIndices()public int[] getAccessedLocalsIndices()
Subroutine
getAccessedLocalsIndices in interface SubroutineSubroutine.getRecursivelyAccessedLocalsIndices()public Subroutine[] subSubs()
Subroutine
subSubs in interface Subroutinevoid setLocalVariable(int i)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||