Klasse Output
java.lang.Object
org.apache.torque.generator.configuration.controller.Output
The configuration for an output (typically one or more files).
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the reference to the outlet which should produce the content.Returns the character encoding of the generated file(s).Returns the strategy how existing target files should be handled.Returns the name of the file to generate.Returns the reference to the outlet which should produce the file name.getName()
Returns the name by which this output can be identified.getOrDetermineLineBreak
(String content) Returns the line break character(s) for this Output.Returns the key for the output directory into which the output is written.Returns the list of postprocessors which should be applied to the generation result.Returns how the sources should be post-processed before generation.Returns the source provider which provides the input for generating the output file's contents.getType()
Returns the type of the produced output, e.g. java, xml.void
setContentOutlet
(OutletReference contentOutlet) Sets the reference to the outlet which should produce the content.void
setEncoding
(Charset charSet) Sets the character encoding of the generated file(s).void
setExistingTargetStrategy
(String existingTargetStrategy) Sets the strategy how existing target files should be handled.void
setFilename
(String filename) Sets the name of the file to generate.void
setFilenameOutlet
(Outlet filenameOutlet) Sets the reference to the outlet which should produce the file name.void
setOutputDirKey
(String outputKeyDir) Sets the key for the output directory into which the output is written.void
setSourceProcessConfiguration
(SourceProcessConfiguration sourceProcessConfiguration) Sets how the sources should be post-processed before generation.void
setSourceProvider
(SourceProvider sourceProvider) Sets the source provider which provides the input for generating the output file's contents.void
Sets the type of the produced output, e.g. java, xml.toString()
-
Konstruktordetails
-
Output
Constructor.- Parameter:
name
- the name by which this output can be identified.
-
-
Methodendetails
-
getName
Returns the name by which this output can be identified.- Gibt zurück:
- the name by which this output can be identified, not null.
-
getSourceProvider
Returns the source provider which provides the input for generating the output file's contents.- Gibt zurück:
- the source provider which provides the input for generation.
-
setSourceProvider
Sets the source provider which provides the input for generating the output file's contents.- Parameter:
sourceProvider
- the source provider which provides the input for generation.
-
getSourceProcessConfiguration
Returns how the sources should be post-processed before generation.- Gibt zurück:
- the information about post-processing the sources.
-
setSourceProcessConfiguration
Sets how the sources should be post-processed before generation.- Parameter:
sourceProcessConfiguration
- the information about post-processing the sources.
-
getPostprocessorDefinitions
Returns the list of postprocessors which should be applied to the generation result.- Gibt zurück:
- the modifiable list of postprocessors, not null. Changes to the returned list change this object as well.
-
setFilename
Sets the name of the file to generate. This is also used to store the generated filename if it was generated using the filenameOutlet.- Parameter:
filename
- the name of the file to generate.
-
getFilename
Returns the name of the file to generate. Either this name was given explicitly or it was set using the filenameOutlet.- Gibt zurück:
- the name of the file to generate.
-
getContentOutlet
Returns the reference to the outlet which should produce the content.- Gibt zurück:
- the reference to the outlet responsible for producing the content.
-
setContentOutlet
Sets the reference to the outlet which should produce the content.- Parameter:
contentOutlet
- the reference to the outlet responsible for producing the content.
-
getFilenameOutlet
Returns the reference to the outlet which should produce the file name. If this attribute is set, it takes precedence over a set filename.- Gibt zurück:
- the reference to the outlet responsible for producing the file name, or null if the file name is explicitly given.
-
setFilenameOutlet
Sets the reference to the outlet which should produce the file name.- Parameter:
filenameOutlet
- the reference to the outlet responsible for producing the file name.
-
getExistingTargetStrategy
Returns the strategy how existing target files should be handled.- Gibt zurück:
- the strategy name.
-
setExistingTargetStrategy
Sets the strategy how existing target files should be handled.- Parameter:
existingTargetStrategy
- the strategy name.
-
getOutputDirKey
Returns the key for the output directory into which the output is written.- Gibt zurück:
- the key for the output directory, or null for the default output directory.
-
setOutputDirKey
Sets the key for the output directory into which the output is written.- Parameter:
outputKeyDir
- the key for the output directory, or null for the default output directory.
-
getEncoding
Returns the character encoding of the generated file(s).- Gibt zurück:
- The character encoding of the generated file, or null for the platform default encoding.
-
setEncoding
Sets the character encoding of the generated file(s).- Parameter:
charSet
- The character encoding of the generated file, or null for the platform default encoding.
-
setType
Sets the type of the produced output, e.g. java, xml.- Parameter:
type
- the type, not null.- Löst aus:
NullPointerException
- if type is null.
-
getType
Returns the type of the produced output, e.g. java, xml.- Gibt zurück:
- the type, not null.
-
getOrDetermineLineBreak
Returns the line break character(s) for this Output.If the line break was already determined, the already determined line break character(s) are returned, and content is ignored.
If the line break character was not already determined, the occurrence of the different line break characters is counted and the largest is returned ("\r\n" for equal count)
If one of them is > 0, the result is cached and stored; if all occurrences are 0, the result is not cached and will be determined anew if the method is called another time for the same output.
- Parameter:
content
- the already produced content.- Gibt zurück:
- the line break character(s), one of "\r", "\n", "\r\n".
-
toString
-