org.codehaus.janino
Class Java.LocalVariableSlot
java.lang.Object
org.codehaus.janino.Java.LocalVariableSlot
- Enclosing class:
- Java
public static class Java.LocalVariableSlot
- extends Object
All local variables have a slot number; local variables that get written into the 'localvariabletable'
also have a start and end offset that defines the variable's extent in the bytecode. If the name is null,
or variable debugging is not on, then the variable won't be written into the localvariabletable and the
offsets can be ignored.
Java.LocalVariableSlot
public Java.LocalVariableSlot(String name,
short slotNumber,
IClass type)
toString
public String toString()
- Overrides:
toString in class Object
getSlotIndex
public short getSlotIndex()
- Returns:
- The 'local variable index' associated with this local variable
setSlotIndex
public void setSlotIndex(short slotIndex)
- Parameters:
slotIndex - The 'local variable index' to associate with this local variable
getName
public String getName()
- Returns:
- The name of this local variable
setName
public void setName(String name)
- Parameters:
name - The name of this local variable
getStart
public CodeContext.Offset getStart()
- Returns:
- The
CodeContext.Offset from which this local variable is visible
setStart
public void setStart(CodeContext.Offset start)
- Parameters:
start - The CodeContext.Offset from which this local variable is visible
getEnd
public CodeContext.Offset getEnd()
- Returns:
- The
CodeContext.Offset up to which this local variable is visible
setEnd
public void setEnd(CodeContext.Offset end)
- Parameters:
end - The CodeContext.Offset up to which this local variable is visible
getType
public IClass getType()
- Returns:
- the resolved type of this local variable