public class BytecodeVariable
extends Object
Represents compile time variable metadata while compiling a method.
| Modifiers | Name | Description |
|---|---|---|
static BytecodeVariable |
SUPER_VARIABLE |
Sentinel metadata for the implicit super receiver. |
static BytecodeVariable |
THIS_VARIABLE |
Sentinel metadata for the implicit this receiver. |
| Constructor and description |
|---|
BytecodeVariable(int index, ClassNode type, String name, int prevCurrent)Creates bytecode metadata for a local variable slot. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public org.objectweb.asm.Label |
getEndLabel()
|
|
public int |
getIndex()
|
|
public String |
getName()
|
|
public int |
getPrevIndex()
|
|
public org.objectweb.asm.Label |
getStartLabel()
|
|
public ClassNode |
getType()
|
|
public boolean |
isDynamicTyped()
|
|
public boolean |
isHolder()
|
|
public void |
setDynamicTyped(boolean dynamicTyped)Marks whether the variable should be treated as dynamically typed. |
|
public void |
setEndLabel(org.objectweb.asm.Label endLabel)Sets the end label used for local-variable table metadata. |
|
public void |
setHolder(boolean holder)Marks whether this variable must be stored through a holder object. |
|
public void |
setStartLabel(org.objectweb.asm.Label startLabel)Sets the start label used for local-variable table metadata. |
|
public void |
setType(ClassNode type)Updates the tracked variable type. |
|
public String |
toString()Returns a string representation of the object.
|
Sentinel metadata for the implicit super receiver.
Sentinel metadata for the implicit this receiver.
Marks whether the variable should be treated as dynamically typed.
dynamicTyped - true if the variable is dynamically typedSets the end label used for local-variable table metadata.
endLabel - the ending labelMarks whether this variable must be stored through a holder object.
holder - true if the variable is closure-sharedSets the start label used for local-variable table metadata.
startLabel - the starting labelUpdates the tracked variable type.
type - the new variable typeReturns a string representation of the object.
toString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The string output is not necessarily stable over time or across
JVM invocations.toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.