Package org.plumelib.bcelutil
Class StackTypes
- java.lang.Object
-
- org.plumelib.bcelutil.StackTypes
-
public final class StackTypes extends java.lang.ObjectStores the types on the stack at each instruction (identified by byte code offset) in a method.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) org.apache.bcel.verifier.structurals.LocalVariables @SameLen("operandStacks") []localVariablesesThe state of the live local variables at each instruction location.(package private) org.apache.bcel.verifier.structurals.OperandStack @SameLen("localVariableses") []operandStacksThe state of the operand stack at each instruction location.
-
Constructor Summary
Constructors Constructor Description StackTypes(org.apache.bcel.generic.MethodGen mg)Create a record of the types on the stack at each instruction in a method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.bcel.verifier.structurals.OperandStackget(@org.checkerframework.checker.index.qual.IndexFor({"localVariableses", "operandStacks"}) int offset)Returns the stack contents at the specified offset.voidset(@org.checkerframework.checker.index.qual.IndexFor({"localVariableses", "operandStacks"}) int offset, org.apache.bcel.verifier.structurals.Frame f)Sets the stack for the instruction at the specified offset to a copy of the information in the given frame.java.lang.StringtoString()java.lang.StringtoString(org.apache.bcel.verifier.structurals.LocalVariables lv)Return a printed representation of the given LocalVariables.java.lang.StringtoString(org.apache.bcel.verifier.structurals.OperandStack os)Return a printed representation of the given OperandStack.
-
-
-
Field Detail
-
operandStacks
org.apache.bcel.verifier.structurals.OperandStack @SameLen("localVariableses") [] operandStacksThe state of the operand stack at each instruction location. The instruction's byte code offset is used as the index.
-
localVariableses
org.apache.bcel.verifier.structurals.LocalVariables @SameLen("operandStacks") [] localVariablesesThe state of the live local variables at each instruction location. The instruction's byte code offset is used as the index.
-
-
Method Detail
-
set
public void set(@org.checkerframework.checker.index.qual.IndexFor({"localVariableses", "operandStacks"}) int offset, org.apache.bcel.verifier.structurals.Frame f)Sets the stack for the instruction at the specified offset to a copy of the information in the given frame.- Parameters:
offset- the offset at which the instruction appearsf- the stack frame to use for the instruction
-
get
public org.apache.bcel.verifier.structurals.OperandStack get(@org.checkerframework.checker.index.qual.IndexFor({"localVariableses", "operandStacks"}) int offset)Returns the stack contents at the specified offset.- Parameters:
offset- the offset to which to get the stack contents- Returns:
- the stack at the (instruction at the) given offset
-
toString
@SideEffectFree public java.lang.String toString(@GuardSatisfied StackTypes this)
- Overrides:
toStringin classjava.lang.Object
-
toString
@SideEffectFree public java.lang.String toString(@GuardSatisfied StackTypes this, org.apache.bcel.verifier.structurals.OperandStack os)Return a printed representation of the given OperandStack.- Parameters:
os- the OperandStack to print- Returns:
- a printed representation of
os
-
toString
@SideEffectFree public java.lang.String toString(@GuardSatisfied StackTypes this, org.apache.bcel.verifier.structurals.LocalVariables lv)Return a printed representation of the given LocalVariables.- Parameters:
lv- the LocalVariablesStack to print- Returns:
- a printed representation of
lv
-
-