|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.textx.GlobalLocalVariables
public class GlobalLocalVariables
Contains global and local variable settings. It insures that local variables are used before global variables if they have the same name.
| Constructor Summary | |
|---|---|
GlobalLocalVariables()
Initialize the new instance with default values. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getValue(java.lang.String varName)
Returns the value for the variable with the given name. |
boolean |
isKnownVariable(java.lang.String varName)
Returns if the variable with the given name can be resolved by the receiver. |
java.util.Set |
knownVariableNames()
Returns all variable name the resolver currently knows |
void |
newGlobalContext(VariableContainer varContainer)
Initialize the global variable container with an new container. |
void |
newLocalContext(VariableContainer varContainer)
Initialize the local variable container with an new container. |
void |
removeVariable(java.lang.String varName)
Remove the variable with the specified name. |
void |
set(java.lang.String varName,
java.lang.String value,
boolean global)
Set the variable with the given name to the specified value. |
void |
setGlobal(java.lang.String varName,
java.lang.String value)
Set the global variable with the given name to the specified value. |
void |
setGlobalFrom(java.util.Properties vars)
Adds all given name/value pairs from the given properties to the global variables. |
void |
setGlobalObject(java.lang.String varName,
java.lang.Object value)
Set the global variable with the given name to the specified value. |
void |
setLocal(java.lang.String varName,
java.lang.String value)
Set the local variable with the given name to the specified value. |
void |
setLocalFrom(java.util.Properties vars)
Adds all given name/value pairs from the given properties to the local variables. |
void |
setLocalObject(java.lang.String varName,
java.lang.Object value)
Set the local variable with the given name to the specified value. |
void |
setValue(java.lang.String varName,
java.lang.String value)
Set the value of the specified variable. |
void |
setValueFor(java.lang.String varName,
java.lang.Object value)
Sets the value of the variable with the given name. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GlobalLocalVariables()
| Method Detail |
|---|
public void newLocalContext(VariableContainer varContainer)
varContainer - The new container (must not be null)public void newGlobalContext(VariableContainer varContainer)
varContainer - The new container (must not be null)
public void set(java.lang.String varName,
java.lang.String value,
boolean global)
varName - The name of the variablevalue - The value to be assigned to the variableglobal - Defines whether or not the variable is global
public void setLocal(java.lang.String varName,
java.lang.String value)
varName - The name of a local variablevalue - The value to be assigned to the variable
public void setLocalObject(java.lang.String varName,
java.lang.Object value)
varName - The name of a local variablevalue - The value to be assigned to the variable
public void setGlobal(java.lang.String varName,
java.lang.String value)
varName - The name of a local variablevalue - The value to be assigned to the variable
public void setGlobalObject(java.lang.String varName,
java.lang.Object value)
varName - The name of a local variablevalue - The value to be assigned to the variablepublic void setGlobalFrom(java.util.Properties vars)
public void setLocalFrom(java.util.Properties vars)
public void setValue(java.lang.String varName,
java.lang.String value)
setValue in interface VariableContainervarName - The name under which the value has to be storedvalue - The value to store
public void setValueFor(java.lang.String varName,
java.lang.Object value)
setValueFor in interface VariableContainervarName - The case sensitive name of the variable. Must not be null !value - The new value of the variable. Must not be null !public void removeVariable(java.lang.String varName)
removeVariable in interface VariableContainervarName - The name of the variable to be removedpublic java.util.Set knownVariableNames()
knownVariableNames in interface VariableResolver
public java.lang.Object getValue(java.lang.String varName)
throws UnknownVariableException
getValue in interface VariableResolvervarName - The case sensitive name of the variable.
UnknownVariableException - The receiver is not knowing the variable.public boolean isKnownVariable(java.lang.String varName)
isKnownVariable in interface VariableResolvervarName - The case sensitive name of the variable.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||