org.sandev.sandbuild
Class SandGenDecl

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.sandev.sandbuild.SandTask
              extended byorg.sandev.sandbuild.SandGenDecl

public class SandGenDecl
extends SandTask

Declare a generator to be run as part of the build. Generators are used for metacoding. See the SandGenerator interface for details.

Generators are run in the order in which they are declared. Generator declarations for a required project are added at the point where the requiredproject declaration is processed.


Field Summary
protected  boolean changed
          Setting this field to true will force the generator to be rebuilt when the build is run.
protected  java.lang.String classFile
          The class file is set when the build checks the generator for updates.
protected  java.lang.String classname
          The fully qualified class name of the generator to run.
protected  java.lang.String extra
          This field can be set to hold any additional information that should be passed to the generator at runtime.
protected  java.lang.String projName
          The project this generator is associated with.
protected  java.lang.String runscope
          What the scope of the generator runtime should be.
protected  java.lang.String source
          What source this generator uses.
protected  java.lang.String sourcescope
          What the scope of the required input should be.
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
SandGenDecl()
           
 
Method Summary
 void execute()
          See class comments.
 java.lang.String getClassFile()
           
 java.lang.String getClassname()
           
 java.lang.String getExtra()
           
 java.lang.String getProjName()
           
 java.lang.String getRunscope()
           
 java.lang.String getSource()
           
 java.lang.String getSourcescope()
           
 boolean hasChanged()
           
 void setChanged(boolean changed)
           
 void setClassFile(java.lang.String filename)
           
 void setClassname(java.lang.String classname)
           
 void setExtra(java.lang.String extra)
           
 void setProjName(java.lang.String name)
           
 void setRunscope(java.lang.String runscope)
           
 void setSource(java.lang.String source)
           
 void setSourcescope(java.lang.String scope)
           
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classname

protected java.lang.String classname
The fully qualified class name of the generator to run. The source for this file found off the build/generate directory of the project.


source

protected java.lang.String source
What source this generator uses. This can be one of the following values:


sourcescope

protected java.lang.String sourcescope
What the scope of the required input should be. This can be one of the following values:


runscope

protected java.lang.String runscope
What the scope of the generator runtime should be. This can be one of the following values:


projName

protected java.lang.String projName
The project this generator is associated with. This defaults to the declaring project, and is used for appropriate scoping behavior at runtime.


changed

protected boolean changed
Setting this field to true will force the generator to be rebuilt when the build is run. This field is set at runtime based on whether the source code has changed relative to the class file. This flag has no effect on whether the generator is run (generators are always run for a global build).


extra

protected java.lang.String extra
This field can be set to hold any additional information that should be passed to the generator at runtime.


classFile

protected java.lang.String classFile
The class file is set when the build checks the generator for updates. It is used to load the generator dynamically if necessary.

Constructor Detail

SandGenDecl

public SandGenDecl()
Method Detail

setClassname

public void setClassname(java.lang.String classname)

getClassname

public java.lang.String getClassname()

setSource

public void setSource(java.lang.String source)

getSource

public java.lang.String getSource()

setSourcescope

public void setSourcescope(java.lang.String scope)

getSourcescope

public java.lang.String getSourcescope()

setRunscope

public void setRunscope(java.lang.String runscope)

getRunscope

public java.lang.String getRunscope()

setProjName

public void setProjName(java.lang.String name)

getProjName

public java.lang.String getProjName()

setChanged

public void setChanged(boolean changed)

hasChanged

public boolean hasChanged()

setExtra

public void setExtra(java.lang.String extra)

getExtra

public java.lang.String getExtra()

setClassFile

public void setClassFile(java.lang.String filename)

getClassFile

public java.lang.String getClassFile()

execute

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

Throws:
org.apache.tools.ant.BuildException