|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.torque.generator.variable.VariableStore
public class VariableStore
Stores all variables which are currently accessible.
Constructor Summary | |
---|---|
VariableStore()
|
Method Summary | |
---|---|
void |
clear()
Removes all variables from this store. |
void |
endFile()
Signals this store that the processing of one file has ended. |
void |
endGeneration()
Signals this store that generation has ended. |
void |
endOutlet()
Signals this store that the processing of a outlet has ended. |
QualifiedNameMap<Variable> |
getContent()
Returns a map with the variables contained in this store. |
Variable |
getInHierarchy(QualifiedName key)
Returns the most specific variable which is visible from the key's namespace and has the same name as the key's name. |
void |
remove(Variable variable)
removes a variable from the store. |
void |
set(Variable variable)
Sets a variable. |
void |
startOutlet()
Signals this store that the processing of a outlet has started. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VariableStore()
Method Detail |
---|
public void set(Variable variable)
variable
- the variable to set.
NullPointerException
- if variable is null.public void remove(Variable variable)
variable
- the variable to remove, not null.
NullPointerException
- if variable is null.public void startOutlet()
public void endOutlet()
Variable.Scope.OUTLET
,
and all variables with the scope Variable.Scope.CHILDREN
which were set by the outlet which processing ended.
public void endFile()
FILE
.
public void endGeneration()
public void clear()
public QualifiedNameMap<Variable> getContent()
The Map is not backed by this stores, i.e. adding and removing variables to the returned nmap has no effect on this store. However, the variables in the returned map are the variables in this store, i.e. setting the value of the variable will change the variable in this store.
Note: The current store content is rebuilt each time this method is
called. For this reason,
store.getInHierarchy(qualifiedName)
is much faster than store.getContent().get(qualifiedName)
.
public Variable getInHierarchy(QualifiedName key)
key
- The key for the variable.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |