Package org.objectweb.asm.commons
Class AdviceAdapter.StackFrame
java.lang.Object
org.objectweb.asm.commons.AdviceAdapter.StackFrame
- Enclosing class:
- AdviceAdapter
A stack map frame represented with one bit per element. Each bit indicates whether the element
is UNINITIALIZED_THIS (bit = 1), or OTHER (i.e., any other value; bit = 0).
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty stack map frame.StackFrame(AdviceAdapter.StackFrame stackFrame) Constructs a copy of the given stack map frame. -
Method Summary
Modifier and TypeMethodDescription(package private) static long[]arraycopy(long[] array, int newLength) Returns a copy of the given array, possibly with a larger size.(package private) booleangetLocal(int index) Returns the value of the given local variable.(package private) booleanpop()Pops a value from the stack and returns its value.(package private) voidpush(boolean value) Pushes a new value on the stack.(package private) voidsetLocal(int index, boolean value) Sets the value of the given local variable.(package private) intReturns the number of bytes used by object in memory.
-
Field Details
-
locals
long[] localsThe values of the local variables. Long and double are represented with two values (i.e., two bits equal to OTHER). Local variables whose index is larger than the number of bits in this array are equal to OTHER. -
stack
long[] stackThe values on the stack. Long and double are represented with two values (i.e., two bits equal to OTHER). -
stackSize
int stackSizeThe number of values on the stack.
-
-
Constructor Details
-
StackFrame
StackFrame()Constructs an empty stack map frame. -
StackFrame
StackFrame(AdviceAdapter.StackFrame stackFrame) Constructs a copy of the given stack map frame.- Parameters:
stackFrame- the stack map frame to copy.
-
-
Method Details
-
getLocal
boolean getLocal(int index) Returns the value of the given local variable.- Parameters:
index- a local variable index.- Returns:
- the local variable value
-
setLocal
void setLocal(int index, boolean value) Sets the value of the given local variable.- Parameters:
index- a local variable index.value- the new local variable value.
-
push
void push(boolean value) Pushes a new value on the stack.- Parameters:
value- the value to push.
-
pop
boolean pop()Pops a value from the stack and returns its value.- Returns:
- the value popped from the stack.
-
sizeInBytes
int sizeInBytes()Returns the number of bytes used by object in memory.- Returns:
- the number of bytes used by object in memory. In theory, might be negative in case of overflow. In practice this should never happen.
-
arraycopy
static long[] arraycopy(long[] array, int newLength) Returns a copy of the given array, possibly with a larger size.- Parameters:
array- the array to copy.newLength- the length of the copied array (must be greater than or equal to array.length).- Returns:
- the copied array.
-