Package org.codehaus.janino
Class Java.LocalVariableSlot
- java.lang.Object
-
- org.codehaus.janino.Java.LocalVariableSlot
-
- Enclosing class:
- Java
public static class Java.LocalVariableSlot extends java.lang.ObjectAll local variables have a slot number; local variables that get written into the "local variable table" 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.
-
-
Field Summary
Fields Modifier and Type Field Description private CodeContext.Offsetendprivate java.lang.Stringnameprivate shortslotIndexprivate CodeContext.Offsetstartprivate ITypetype
-
Constructor Summary
Constructors Constructor Description LocalVariableSlot(java.lang.String name, short slotNumber, IType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CodeContext.OffsetgetEnd()java.lang.StringgetName()shortgetSlotIndex()CodeContext.OffsetgetStart()ITypegetType()voidsetEnd(CodeContext.Offset end)voidsetName(java.lang.String name)voidsetSlotIndex(short slotIndex)voidsetStart(CodeContext.Offset start)java.lang.StringtoString()
-
-
-
Field Detail
-
slotIndex
private short slotIndex
-
name
@Nullable private java.lang.String name
-
start
@Nullable private CodeContext.Offset start
-
end
@Nullable private CodeContext.Offset end
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getSlotIndex
public short getSlotIndex()
- Returns:
- The "local variable index" associated with this local variable (two slots for LONG and DOUBLE local variables)
-
setSlotIndex
public void setSlotIndex(short slotIndex)
- Parameters:
slotIndex- The "local variable index" to associate with this local variable
-
getName
@Nullable public java.lang.String getName()
- Returns:
- The name of this local variable
-
setName
public void setName(java.lang.String name)
- Parameters:
name- The name of this local variable
-
getStart
@Nullable public CodeContext.Offset getStart()
- Returns:
- The
CodeContext.Offsetfrom which this local variable is visible
-
setStart
public void setStart(CodeContext.Offset start)
- Parameters:
start- TheCodeContext.Offsetfrom which this local variable is visible
-
getEnd
@Nullable public CodeContext.Offset getEnd()
- Returns:
- The
CodeContext.Offsetup to which this local variable is visible
-
setEnd
public void setEnd(CodeContext.Offset end)
- Parameters:
end- TheCodeContext.Offsetup to which this local variable is visible
-
getType
public IType getType()
- Returns:
- the resolved type of this local variable
-
-