public class Frame extends Object
| Constructor and Description | 
|---|
| Frame(int locals,
     int stack)Create a new frame with the specified local variable table size, and max stack size | 
| Modifier and Type | Method and Description | 
|---|---|
| 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 | 
| String | toString() | 
public Frame(int locals,
             int stack)
locals - the number of local variable table entriesstack - the maximum stack sizepublic Type getLocal(int index)
index - the position in the tablepublic 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 stackpublic 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 frompublic boolean merge(Frame frame)
frame - the frame to merge withCopyright © 2016 Shigeru Chiba, www.javassist.org. All Rights Reserved.