Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.torque.ant.task
Class TorqueGeneratorTask

    java.lang.Object
      org.apache.tools.ant.ProjectComponent
          org.apache.tools.ant.Task
              org.apache.torque.ant.task.TorqueGeneratorTask

All Implemented Interfaces:
  Cloneable

    public class TorqueGeneratorTask

extends org.apache.tools.ant.Task

Executes a unit of generation within the torque generator. $Id: TorqueGeneratorTask.java 1401885 2012-10-24 21:13:09Z tfischer $

Field Summary

Fields inherited from class org.apache.tools.ant.Task
`target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`description, location, project`

Constructor Summary
`TorqueGeneratorTask()`

Method Summary
`Option` | `createOption()` Creates a new option and adds it to the list of options.
`void` | `execute()` 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(String defaultOutputEncoding)` 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` | `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.

Methods inherited from class 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`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TorqueGeneratorTask

    public TorqueGeneratorTask()

Method Detail

### createOption

    public Option createOption()

  Creates a new option and adds it to the list of options.

  Returns:
    the newly created option.

### execute

    public void execute()
                 throws org.apache.tools.ant.BuildException

  Runs the generation.

  Overrides:
    `execute` in class `org.apache.tools.ant.Task`
  Throws:
    `org.apache.tools.ant.BuildException`

### setPackaging

    public void setPackaging(String packaging)

  Sets the packaging.

  Parameters:
    `packaging` - the packaging, either "jar" or "directory"

### setProjectRootDir

    public void setProjectRootDir(File projectRootDir)

  Sets the root directory of the project.

  Parameters:
    `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.

  Parameters:
    `targetDir` - 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.

  Parameters:
    `outputDirMap` - the new outputDirMap.

### setJarFile

    public void setJarFile(String jarFile)

  The path to the jar file to use.

  Parameters:
    `jarFile` - the jar file, or null.

### setSourceDir

    public void setSourceDir(File sourceDir)

  Sets the directory in which the source files are located.

  Parameters:
    `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.

  Parameters:
    `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.

  Parameters:
    `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".

### setLoglevel

    public void setLoglevel(String loglevel)

  Sets the Loglevel to use in the generation process.

  Parameters:
    `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.

  Parameters:
    `addDebuggingInfoToOutput` - true if debugging information should be added to the output, false otherwise.

### setDefaultOutputEncoding

    public void setDefaultOutputEncoding(String defaultOutputEncoding)

  Sets the encoding which should be used for the files which do not have an output encoding set in the templates.

  Parameters:
    `defaultOutputEncoding` - 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.

  Parameters:
    `combineFiles` - whether all sources should be combined.

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2013 The Apache Software Foundation. All Rights Reserved.