public class UnitDescriptor extends Object
Modifier and Type | Class and Description |
---|---|
static class |
UnitDescriptor.Packaging
Possible packaging forms of a unit of generation.
|
Constructor and Description |
---|
UnitDescriptor(UnitDescriptor.Packaging packaging,
ProjectPaths projectPaths,
TorqueGeneratorPaths configurationPaths)
Constructor without inheritance, override options, overrideSourceFileset,
loglevel and addDebuggingInfoToOutput.
|
Modifier and Type | Method and Description |
---|---|
ClassLoader |
getClassLoader()
Returns the class loader to use by the generator when accessing
the templates or classes defined within the templates.
|
TorqueGeneratorPaths |
getConfigurationPaths()
Returns the paths in the configuration of this generation unit.
|
String |
getDefaultOutputEncoding()
Returns the output encoding if no specific encoding has been set
in the output.
|
UnitDescriptor |
getInheritsFrom()
Returns the descriptor of the generation unit from which this generation
unit inherits, or null if this generation unit does not inherit from
another generation unit.
|
Loglevel |
getLoglevel()
Returns the log level overriding the loglevel defined in the
configuration unit.
|
OptionsConfiguration |
getOverrideOptions()
Returns the configuration of the overriding options, if any.
|
SourceProvider |
getOverrideSourceProvider()
Returns the source provider overriding the source defined in the
control file, or null if the control file definition
is not overridden.
|
UnitDescriptor.Packaging |
getPackaging()
Returns the packaging of the unit of generation.
|
ProjectPaths |
getProjectPaths()
Returns the paths which the Torque generator must know about the
surrounding project.
|
boolean |
isAddDebuggingInfoToOutput()
Returns whether debugging info should be added to the output.
|
boolean |
isRunOnlyOnSourceChange()
Returns true if only the sources should be processed which have
changed since last generation.
|
void |
setAddDebuggingInfoToOutput(boolean addDebuggingInfoToOutput)
Sets whether debugging info should be added to the output.
|
void |
setClassLoader(ClassLoader classLoader)
Sets the class loader to use by the generator when accessing
the templates or classes defined within the templates.
|
void |
setDefaultOutputEncoding(String defaultOutputEncoding)
Sets the output encoding which is used if no specific encoding
has been set in the output.
|
void |
setInheritsFrom(UnitDescriptor inheritsFrom)
Sets the descriptor of the generation unit from which this generation
unit inherits.
|
void |
setLoglevel(Loglevel loglevel)
Sets the log level overriding the loglevel defined in the
configuration unit.
|
void |
setOverrideOptions(OptionsConfiguration overrideOptions)
Sets the configuration of the overriding options, if any.
|
void |
setOverrideSourceProvider(SourceProvider overrideSourceProvider)
Sets the source provider overriding the source defined in the
control file.
|
void |
setRunOnlyOnSourceChange(boolean runOnlyOnSourceChange)
Sets whether only the sources should be processed which have
changed since last generation.
|
public UnitDescriptor(UnitDescriptor.Packaging packaging, ProjectPaths projectPaths, TorqueGeneratorPaths configurationPaths)
packaging
- The packaging of the generation unit, not null.projectPaths
- The paths the Torque generator must know about
the surrounding project, not null.configurationPaths
- The paths within the configuration
of the configuration unit, not null.public UnitDescriptor.Packaging getPackaging()
public ProjectPaths getProjectPaths()
public TorqueGeneratorPaths getConfigurationPaths()
public UnitDescriptor getInheritsFrom()
public void setInheritsFrom(UnitDescriptor inheritsFrom)
inheritsFrom
- the parents unit descriptor,
or null if no parent exists.public SourceProvider getOverrideSourceProvider()
public void setOverrideSourceProvider(SourceProvider overrideSourceProvider)
overrideSourceProvider
- the overriding source provider,
or null if the control file definition is not overridden.public OptionsConfiguration getOverrideOptions()
public void setOverrideOptions(OptionsConfiguration overrideOptions)
overrideOptions
- the configuration of the overriding options,
or null.public Loglevel getLoglevel()
public void setLoglevel(Loglevel loglevel)
loglevel
- the log level, or null.public boolean isAddDebuggingInfoToOutput()
public void setAddDebuggingInfoToOutput(boolean addDebuggingInfoToOutput)
addDebuggingInfoToOutput
- true if debugging info should be added
to the output, false if not.public String getDefaultOutputEncoding()
public void setDefaultOutputEncoding(String defaultOutputEncoding)
defaultOutputEncoding
- the default output encoding,
null for the default platform encoding.public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader classLoader)
classLoader
- the class loader for the templates,
or null if the standard class loader
of the torque generator classes should be used.public boolean isRunOnlyOnSourceChange()
public void setRunOnlyOnSourceChange(boolean runOnlyOnSourceChange)
runOnlyOnSourceChange
- false if the controller should be run
irrespective of changes in the source files,
true if the controller should be run for source files
which have changed during last generation.Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.