terp - the ANT Tasks
v1.3.304

com.codemesh.terp.ant.codegen
Class CodeGeneratorImpl

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by com.codemesh.terp.ant.TerpAwareTask
              extended by com.codemesh.terp.ant.codegen.CodeGeneratorImpl
All Implemented Interfaces:
CodeGenerator, TerpAware, TerpContextHolder, java.lang.Cloneable

public class CodeGeneratorImpl
extends TerpAwareTask
implements CodeGenerator

The default implementation of the code generator task.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.codemesh.terp.ant.TerpAware
TerpAware.Delegate
 
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
CodeGeneratorImpl()
           
 
Method Summary
 CommandOption createCommand()
          Add a code generator command to the invocation.
 ModelFileOption createModelFile()
          Add a code generator model file to the invocation.
 ModelProperty createModelProperty()
          Add a code generator model property to the invocation.
 void execute()
           
 Version getVersion()
          Returns the code generator version.
 void setSpawn(boolean bSpawn)
          Tells the code generator task to execute as a separate process.
 void setWarningsAsErrors(boolean bWE)
          Tells the code generator task to treat warnings as errors.
 
Methods inherited from class com.codemesh.terp.ant.TerpAwareTask
getContext, getIf, getUnless, satisfiesConditions, setContext, setIf, setProject, setUnless
 
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.codemesh.terp.ant.TerpAware
getIf, getUnless, satisfiesConditions, setIf, setUnless
 
Methods inherited from interface com.codemesh.terp.ant.TerpContextHolder
getContext, setContext
 

Constructor Detail

CodeGeneratorImpl

public CodeGeneratorImpl()
Method Detail

getVersion

public Version getVersion()
Description copied from interface: CodeGenerator
Returns the code generator version.

Specified by:
getVersion in interface CodeGenerator
Returns:
the code generator version.

setSpawn

public void setSpawn(boolean bSpawn)
Description copied from interface: CodeGenerator
Tells the code generator task to execute as a separate process.

Specified by:
setSpawn in interface CodeGenerator
Parameters:
bSpawn - true to spawn a code generator process, false to execute in-process.

setWarningsAsErrors

public void setWarningsAsErrors(boolean bWE)
Description copied from interface: CodeGenerator
Tells the code generator task to treat warnings as errors.

Specified by:
setWarningsAsErrors in interface CodeGenerator
Parameters:
bWE - true to treat code generator warnings as errors.

createCommand

public CommandOption createCommand()
Description copied from interface: CodeGenerator
Add a code generator command to the invocation.

Specified by:
createCommand in interface CodeGenerator

createModelProperty

public ModelProperty createModelProperty()
Description copied from interface: CodeGenerator
Add a code generator model property to the invocation.

Specified by:
createModelProperty in interface CodeGenerator

createModelFile

public ModelFileOption createModelFile()
Description copied from interface: CodeGenerator
Add a code generator model file to the invocation.

Specified by:
createModelFile in interface CodeGenerator

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException

terp - the ANT Tasks
v1.3.304

Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.