Klasse TorqueGeneratorTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.torque.ant.task.TorqueGeneratorTask
Alle implementierten Schnittstellen:
Cloneable

public class TorqueGeneratorTask extends org.apache.tools.ant.Task
Executes a unit of generation within the torque generator.

  ant goal generate
 
$Id: TorqueGeneratorTask.java 1917242 2024-04-21 13:30:19Z tv $
  • Feldübersicht

    Von Klasse geerbte Felder org.apache.tools.ant.Task

    target, taskName, taskType, wrapper

    Von Klasse geerbte Felder org.apache.tools.ant.ProjectComponent

    description, location, project
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    Creates a new option and adds it to the list of options.
    void
    Runs the generation.
    void
    setAddDebuggingInfoToOutput(boolean addDebuggingInfoToOutput)
    Sets whether debugging information should be added to the output.
    void
    setCombineFiles(Boolean combineFiles)
    Sets whether all source files should be combined into one source tree.
    void
    setConfigDir(File configDir)
     
    void
    setConfigPackage(String configPackage)
     
    void
    setDefaultOutputDir(File defaultOutputDir)
    Sets the default output base directory for generated files.
    void
    setDefaultOutputEncoding(Charset defaultOutputCharset)
    Sets the encoding which should be used for the files which do not have an output encoding set in the templates.
    void
    setJarFile(String jarFile)
    The path to the jar file to use.
    void
    setLoglevel(String loglevel)
    Sets the Loglevel to use in the generation process.
    void
    setOutputDirMap(Map<String,File> outputDirMap)
    Sets the mapping from outputDirKey to output directories.
    void
    setOverrideConfigDir(File overrideConfigDir)
    Sets the config directory overriding the template settings.
    void
    setPackaging(String packaging)
    Sets the packaging.
    void
    setProjectRootDir(File projectRootDir)
    Sets the root directory of the project.
    void
    setRunOnlyOnSourceChange(boolean runOnlyOnSourceChange)
    Sets whether the generator should only run if one of the source files changes.
    void
    setSourceDir(File sourceDir)
    Sets the directory in which the source files are located.
    void
    setSourceExcludes(Set<String> sourceExcludes)
    Sets the pattern which files are excluded in the generation process.
    void
    setSourceIncludes(Set<String> sourceIncludes)
    Sets the pattern which files are included in the generation process.

    Von Klasse geerbte Methoden org.apache.tools.ant.Task

    bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType

    Von Klasse geerbte Methoden org.apache.tools.ant.ProjectComponent

    clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject

    Von Klasse geerbte Methoden java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • TorqueGeneratorTask

      public TorqueGeneratorTask()
  • Methodendetails

    • createOption

      public Option createOption()
      Creates a new option and adds it to the list of options.
      Gibt zurück:
      the newly created option.
    • execute

      public void execute() throws org.apache.tools.ant.BuildException
      Runs the generation.
      Setzt außer Kraft:
      execute in Klasse org.apache.tools.ant.Task
      Löst aus:
      org.apache.tools.ant.BuildException
    • setPackaging

      public void setPackaging(String packaging)
      Sets the packaging.
      Parameter:
      packaging - the packaging, either "jar" or "directory"
    • setProjectRootDir

      public void setProjectRootDir(File projectRootDir)
      Sets the root directory of the project.
      Parameter:
      projectRootDir - the project root Directory.
    • setConfigDir

      public void setConfigDir(File configDir)
    • setConfigPackage

      public void setConfigPackage(String configPackage)
    • setDefaultOutputDir

      public void setDefaultOutputDir(File defaultOutputDir)
      Sets the default output base directory for generated files.
      Parameter:
      defaultOutputDir - the default output directory, or null to use the default.
    • setOutputDirMap

      public void setOutputDirMap(Map<String,File> outputDirMap)
      Sets the mapping from outputDirKey to output directories. The outputDirKeys are defined in the templates you use.
      Parameter:
      outputDirMap - the new outputDirMap.
    • setJarFile

      public void setJarFile(String jarFile)
      The path to the jar file to use.
      Parameter:
      jarFile - the jar file, or null.
    • setSourceDir

      public void setSourceDir(File sourceDir)
      Sets the directory in which the source files are located.
      Parameter:
      sourceDir - the directory in which the source files are located.
    • setSourceIncludes

      public void setSourceIncludes(Set<String> sourceIncludes)
      Sets the pattern which files are included in the generation process.
      Parameter:
      sourceIncludes - a list containing the include patterns, or null if no include pattern should be used.
    • setSourceExcludes

      public void setSourceExcludes(Set<String> sourceExcludes)
      Sets the pattern which files are excluded in the generation process.
      Parameter:
      sourceExcludes - a list containing the exclude patterns, or null if no exclude pattern should be used.
    • setOverrideConfigDir

      public void setOverrideConfigDir(File overrideConfigDir)
      Sets the config directory overriding the template settings. If set, the settings of this directory are used as "child" and the "normal" settings are used as "parent".
      Parameter:
      overrideConfigDir - the config directory overriding the template settings, or null if the template settings will not be overridden.
    • setLoglevel

      public void setLoglevel(String loglevel)
      Sets the Loglevel to use in the generation process.
      Parameter:
      loglevel - the loglevel, must be one of trace, debug, info, warn or error, or null if the loglevel defined in the templates should be used.
    • setAddDebuggingInfoToOutput

      public void setAddDebuggingInfoToOutput(boolean addDebuggingInfoToOutput)
      Sets whether debugging information should be added to the output.
      Parameter:
      addDebuggingInfoToOutput - true if debugging information should be added to the output, false otherwise.
    • setRunOnlyOnSourceChange

      public void setRunOnlyOnSourceChange(boolean runOnlyOnSourceChange)
      Sets whether the generator should only run if one of the source files changes. The default value is false.
      Parameter:
      runOnlyOnSourceChange - true if the generator should only run if one of the source files changes, false if it should always run irrespective of changes in the source files.
    • setDefaultOutputEncoding

      public void setDefaultOutputEncoding(Charset defaultOutputCharset)
      Sets the encoding which should be used for the files which do not have an output encoding set in the templates.
      Parameter:
      defaultOutputCharset - the default output encoding, or null to use the generator default (the platform default encoding).
    • setCombineFiles

      public void setCombineFiles(Boolean combineFiles)
      Sets whether all source files should be combined into one source tree. If false, each source file will be read in its own source tree and start a new generation run. If true, a single source tree with the following structure will be built from all source files: <source> <file path="path/to/file1"> <rootOfFile1> ... </rootOfFile1> </file> <file path="path/to/file2"> <rootOfFile2> ... </rootOfFile2> </file> ... </source> If not set, the settings from the templates will be used.
      Parameter:
      combineFiles - whether all sources should be combined.