|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavassist.bytecode.analysis.Frame
public class Frame
Represents the stack frame and local variable table at a particular point in time.
Constructor Summary | |
---|---|
Frame(int locals,
int stack)
Create a new frame with the specified local variable table size, and max stack size |
Method Summary | |
---|---|
void |
clearStack()
Empties the stack |
Frame |
copy()
Makes a shallow copy of this frame, i.e. |
Frame |
copyStack()
Makes a shallow copy of the stack portion of this frame. |
Type |
getLocal(int index)
Returns the local varaible table entry at index. |
Type |
getStack(int index)
Returns the type on the stack at the specified index. |
int |
getTopIndex()
Gets the index of the type sitting at the top of the stack. |
int |
localsLength()
Returns the number of local variable table entries, specified at construction. |
boolean |
merge(Frame frame)
Merges all types on the stack and local variable table of this frame with that of the specified type. |
boolean |
mergeStack(Frame frame)
Merges all types on the stack of this frame instance with that of the specified frame. |
Type |
peek()
Gets the top of the stack without altering it |
Type |
pop()
Alters the stack to contain one less element and return it. |
void |
push(Type type)
Alters the stack by placing the passed type on the top |
void |
setLocal(int index,
Type type)
Sets the local variable table entry at index to a type. |
void |
setStack(int index,
Type type)
Sets the type of the stack position |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Frame(int locals, int stack)
locals
- the number of local variable table entriesstack
- the maximum stack sizeMethod Detail |
---|
public Type getLocal(int index)
index
- the position in the table
public void setLocal(int index, Type type)
index
- the position in the tabletype
- the type to set at the positionpublic Type getStack(int index)
index
- the position on the stack
public void setStack(int index, Type type)
index
- the position on the stacktype
- the type to setpublic void clearStack()
public int getTopIndex()
public int localsLength()
public Type peek()
public Type pop()
public void push(Type type)
type
- the type to add to the toppublic Frame copy()
public Frame copyStack()
public boolean mergeStack(Frame frame)
frame
- the frame to merge the stack from
public boolean merge(Frame frame)
frame
- the frame to merge with
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |