|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.torque.generator.control.ControllerState
public class ControllerState
The state of the controller. Contains all stuff the controller needs to track.
Constructor Summary | |
---|---|
ControllerState()
|
Method Summary | |
---|---|
boolean |
getBooleanOption(OptionName optionName)
Convenience method to return the value of an option as boolean. |
boolean |
getBooleanOption(String name)
Convenience method to return the value of an option as boolean. |
Object |
getOption(OptionName optionName)
Calculates the value of an option in the current outlet's context. |
Object |
getOption(String name)
Calculates the value of an option in the current outlet's context. |
Outlet |
getOutlet()
Returns the topmost outlet in the stack of outlets. |
Namespace |
getOutletNamespace()
Returns the namespace of the outlet which is currently active. |
Output |
getOutput()
Returns the output declaration which is currently processed. |
File |
getOutputFile()
Returns the currently generated file. |
QualifiedName |
getQualifiedName(String name)
Converts a name to a QualifiedName, using the outlet namespace as default namespace is fone is given. |
SourceElement |
getRootElement()
Returns the root element of the current source. |
OutletReference |
getRootOutletReference()
Returns the reference to the current outlet. |
SourceElement |
getSourceElement()
Returns the current source element. |
File |
getSourceFile()
Returns the currently used source file. |
SourceProvider |
getSourceProvider()
Returns the source provider which is currently in use. |
String |
getStringOption(OptionName optionName)
Convenience method to return the value of an option as String. |
String |
getStringOption(String name)
Convenience method to return the value of an option as String. |
UnitConfiguration |
getUnitConfiguration()
Returns the configuration of the currently processed generation unit. |
VariableStore |
getVariableStore()
Returns the VariableStore where generation variables can be set. |
Options |
getVisibleOptions()
Returns all options which are visible from the current outlet's namespace. |
Outlet |
popOutlet()
Pops the topmost outlets from the stack of outlets. |
void |
pushOutlet(Outlet outlet)
Pushes a outlet onto the stack of outlets. |
void |
setRootElement(SourceElement rootElement)
Sets the root element of the current source. |
void |
setSourceElement(SourceElement sourceElement)
Sets the current source element. |
void |
setSourceFile(File sourceFile)
Sets the currently used source file. |
void |
setSourceProvider(SourceProvider sourceProvider)
Sets the source provider which is currently in use. |
void |
setUnitConfiguration(UnitConfiguration unitConfiguration)
Sets the configuration of the currently processed generation unit. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ControllerState()
Method Detail |
---|
public SourceProvider getSourceProvider()
public void setSourceProvider(SourceProvider sourceProvider)
sourceProvider
- the current source provider.public Output getOutput()
public Outlet getOutlet()
public void pushOutlet(Outlet outlet)
outlet
- the outlet to be added to the stack of outlets,
not null.public Outlet popOutlet()
IndexOutOfBoundsException
- if the stack is empty.public SourceElement getSourceElement()
public void setSourceElement(SourceElement sourceElement)
sourceElement
- the new current source element, or null
to remove the current source element.public SourceElement getRootElement()
public void setRootElement(SourceElement rootElement)
rootElement
- the the root element of the current source,
or null to remove the current root element.public OutletReference getRootOutletReference()
public Namespace getOutletNamespace()
public Object getOption(String name)
name
is the namespace of the currently used outlet.
name
- the name of the option, can contain a namespace.
public Object getOption(OptionName optionName)
name
is the namespace of the currently used outlet.
name
- the object containing the name of the option,
which can contain a namespace, not null.
NullPointerException
- if optionName is null.public boolean getBooleanOption(String name)
name
- the name of the option, can contain a namespace.
public boolean getBooleanOption(OptionName optionName)
optionName
- the object containing the name of the option,
which can contain a namespace.
NullPointerExeption
- if optionName is null.public String getStringOption(String name)
name
- the name of the option, can contain a namespace.
public String getStringOption(OptionName optionName)
optionName
- the object containing the name of the option,
which can contain a namespace.
NullPointerExeption
- if optionName is null.public Options getVisibleOptions()
public VariableStore getVariableStore()
public QualifiedName getQualifiedName(String name)
name
- the name to convert to a qualifiedName, not null.
NullPointerException
- if name is null
IllegalArgumentException
- if name is no valid qualifiedName.public File getOutputFile()
public File getSourceFile()
public void setSourceFile(File sourceFile)
sourceFile
- the current source file, or null to remove the
source file.public UnitConfiguration getUnitConfiguration()
public void setUnitConfiguration(UnitConfiguration unitConfiguration)
unitConfiguration
- the configuration of the currently processed
generation unit.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |