public class Output extends Object
Constructor and Description |
---|
Output(QualifiedName name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
OutletReference |
getContentOutlet()
Returns the reference to the outlet which should produce the content.
|
String |
getEncoding()
Returns the character encoding of the generated file(s).
|
String |
getExistingTargetStrategy()
Returns the strategy how existing target files should be handled.
|
String |
getFilename()
Returns the name of the file to generate.
|
Outlet |
getFilenameOutlet()
Returns the reference to the outlet which should produce
the file name.
|
QualifiedName |
getName()
Returns the name by which this output can be identified.
|
String |
getOrDetermineLineBreak(String content)
Returns the line break character(s) for this Output.
|
String |
getOutputDirKey()
Returns the key for the output directory into which the output is
written.
|
List<PostprocessorDefinition> |
getPostprocessorDefinitions()
Returns the list of postprocessors which should be applied
to the generation result.
|
SourceProcessConfiguration |
getSourceProcessConfiguration()
Returns how the sources should be post-processed before generation.
|
SourceProvider |
getSourceProvider()
Returns the source provider which provides the input for generating the
output file's contents.
|
String |
getType()
Returns the type of the produced output, e.g.
|
void |
setContentOutlet(OutletReference contentOutlet)
Sets the reference to the outlet which should produce the content.
|
void |
setEncoding(String encoding)
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 |
setType(String type)
Sets the type of the produced output, e.g.
|
String |
toString() |
public Output(QualifiedName name)
name
- the name by which this output can be identified.public QualifiedName getName()
public SourceProvider getSourceProvider()
public void setSourceProvider(SourceProvider sourceProvider)
sourceProvider
- the source provider which provides the input for
generation.public SourceProcessConfiguration getSourceProcessConfiguration()
public void setSourceProcessConfiguration(SourceProcessConfiguration sourceProcessConfiguration)
sourceProcessConfiguration
- the information about
post-processing the sources.public List<PostprocessorDefinition> getPostprocessorDefinitions()
public void setFilename(String filename)
filename
- the name of the file to generate.public String getFilename()
public OutletReference getContentOutlet()
public void setContentOutlet(OutletReference contentOutlet)
contentOutlet
- the reference to the outlet responsible
for producing the content.public Outlet getFilenameOutlet()
public void setFilenameOutlet(Outlet filenameOutlet)
filenameOutlet
- the reference to the outlet responsible
for producing the file name.public String getExistingTargetStrategy()
public void setExistingTargetStrategy(String existingTargetStrategy)
existingTargetStrategy
- the strategy name.public String getOutputDirKey()
public void setOutputDirKey(String outputKeyDir)
outputKeyDir
- the key for the output directory,
or null for the default output directory.public String getEncoding()
public void setEncoding(String encoding)
encoding
- The character encoding of the generated file,
or null for the platform default encoding.public void setType(String type)
type
- the type, not null.NullPointerException
- if type is null.public String getType()
public String getOrDetermineLineBreak(String content)
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.
content
- the already produced content.Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.