Package org.apache.torque.generator.configuration.controller

# Klasse Output

java.lang.Object
org.apache.torque.generator.configuration.controller.Output

public class Output extends Object
The configuration for an output (typically one or more files).

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `Output(QualifiedName name)`
  Constructor.

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `OutletReference`
  `getContentOutlet()`
  Returns the reference to the outlet which should produce the content.
  `Charset`
  `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. 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`
  `setType(String type)`
  Sets the type of the produced output, e.g. java, xml.
  `String`
  `toString()`

  ### Von Klasse geerbte Methoden java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Konstruktordetails

  - ### Output

    public Output(QualifiedName name)
    Constructor.
    Parameter:
      `name` - the name by which this output can be identified.

- ## Methodendetails

  - ### getName

    public QualifiedName 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

    public SourceProvider 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

    public void setSourceProvider(SourceProvider sourceProvider)
    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

    public SourceProcessConfiguration getSourceProcessConfiguration()
    Returns how the sources should be post-processed before generation.
    Gibt zurück:
      the information about post-processing the sources.

  - ### setSourceProcessConfiguration

    public void setSourceProcessConfiguration(SourceProcessConfiguration sourceProcessConfiguration)
    Sets how the sources should be post-processed before generation.
    Parameter:
      `sourceProcessConfiguration` - the information about post-processing the sources.

  - ### getPostprocessorDefinitions

    public List<PostprocessorDefinition> 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

    public void setFilename(String filename)
    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

    public String 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

    public OutletReference 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

    public void setContentOutlet(OutletReference contentOutlet)
    Sets the reference to the outlet which should produce the content.
    Parameter:
      `contentOutlet` - the reference to the outlet responsible for producing the content.

  - ### getFilenameOutlet

    public Outlet 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

    public void setFilenameOutlet(Outlet filenameOutlet)
    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

    public String getExistingTargetStrategy()
    Returns the strategy how existing target files should be handled.
    Gibt zurück:
      the strategy name.

  - ### setExistingTargetStrategy

    public void setExistingTargetStrategy(String existingTargetStrategy)
    Sets the strategy how existing target files should be handled.
    Parameter:
      `existingTargetStrategy` - the strategy name.

  - ### getOutputDirKey

    public String 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

    public void setOutputDirKey(String outputKeyDir)
    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

    public Charset 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

    public void setEncoding(Charset charSet)
    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

    public void setType(String type)
    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

    public String getType()
    Returns the type of the produced output, e.g. java, xml.
    Gibt zurück:
      the type, not null.

  - ### getOrDetermineLineBreak

    public String getOrDetermineLineBreak(String content)
    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

    public String toString()
    Setzt außer Kraft:
      `toString` in Klasse `Object`