T
- the variable typepublic class ParserLocal<T> extends Object
ParsingContext
.Constructor and Description |
---|
ParserLocal()
Constructs a new ParserLocal.
|
ParserLocal(T defaultValue)
Constructs a new ParserLocal.
|
Modifier and Type | Method and Description |
---|---|
protected T |
createDefaultValue()
Called when initialized to return a default value.
|
T |
get(ParsingContext context)
Gets the value.
|
void |
init(int index,
ParsingContext context)
Initializes the variable.
|
void |
set(ParsingContext context,
T obj)
Sets the value.
|
public ParserLocal()
public ParserLocal(T defaultValue)
defaultValue
- the default valueprotected T createDefaultValue()
public final void init(int index, ParsingContext context)
index
- the index of the variable in the heapcontext
- the ParsingContext
being initializedpublic final T get(ParsingContext context)
context
- the ParsingContext
to get the value frompublic final void set(ParsingContext context, T obj)
context
- the ParsingContext
to set the value onobj
- the value