org.ejen
Class EjenTask

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.ejen.EjenTask

public class EjenTask
extends Task

Ejen ant task class (wrapes an EjenRootNode).

Usage (ant build file)

  <?xml version="1.0" encoding="UTF-8"?>

  <project name="generate" default="build">

    <taskdef name="ejen" classname="org.ejen.EjenTask"/>

    <target name="build">
      <ejen [stacktrace="(true|false)"]>
        ...
        <source .../>
        <merge .../>
        <save .../>
        <filter .../>
        <template .../>
        ...
      </ejen>
    </target>

  </project>
 

Parent nodes:

Version:
1.0
Author:
F. Wolff

Field Summary
 
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
EjenTask()
          Constructor (creates a new EjenRootNode and register an EjenListener for message/error reporting.
 
Method Summary
 EjenFilterNode createFilter()
          Creates a new filter node.
 EjenMergeNode createMerge()
          Creates a new merge node.
 EjenSaveNode createSave()
          Creates a new save node.
 EjenSourceNode createSource()
          Creates a new source node.
 EjenTemplateNode createTemplate()
          Creates a new template node.
 void execute()
          Executes the generation, according to child nodes.
 void setStacktrace(boolean stacktrace)
          [optional] - sets the stacktrace option for error reporting (print or not a stack trace).
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
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
 

Constructor Detail

EjenTask

public EjenTask()
Constructor (creates a new EjenRootNode and register an EjenListener for message/error reporting.

Method Detail

setStacktrace

public void setStacktrace(boolean stacktrace)
[optional] - sets the stacktrace option for error reporting (print or not a stack trace). Default is false.

Parameters:
stacktrace - a String equals to "true" or "false", automatically converted to a boolean by Ant.

createFilter

public EjenFilterNode createFilter()
Creates a new filter node.

Returns:
the new filter node.

createTemplate

public EjenTemplateNode createTemplate()
Creates a new template node.

Returns:
the new template node.

createSource

public EjenSourceNode createSource()
Creates a new source node.

Returns:
the new source node.

createSave

public EjenSaveNode createSave()
Creates a new save node.

Returns:
the new save node.

createMerge

public EjenMergeNode createMerge()
Creates a new merge node.

Returns:
the new merge node.

execute

public void execute()
             throws BuildException
Executes the generation, according to child nodes.

Overrides:
execute in class Task
Throws:
BuildException - if goes wrong.