org.codehaus.nanning.attribute
Class AttributesCompiler

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.codehaus.nanning.attribute.AttributesCompiler

public class AttributesCompiler
extends org.apache.tools.ant.Task

Compiles attributes from java sources, use as an ant task or directly from java.

Example usage as Ant task:

        
        

Example usage directly from Java:

        AttributesCompiler attributesCompiler = new AttributesCompiler();
        attributesCompiler.setSrc(source);
        attributesCompiler.setDest(attributesDir);
        attributesCompiler.execute();
After compilation, the destination-directory needs to be included in the classpath.

To use under Maven, add a preGoal to java:compile and test:compile that executes the above ant-code.

To use directly in JUnit (without the need for external recompilation good for execution within an IDE), write an abstract base-class for your tests that executes the above Java-code to compile your attributes before the actual tests are executed.

Version:
$Revision: 1.1 $
Author:
$Author: lecando $

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
AttributesCompiler()
           
 
Method Summary
 void execute()
           
 void setDest(java.io.File dest)
           
 void setSrc(java.io.File src)
           
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, 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

AttributesCompiler

public AttributesCompiler()
Method Detail

setSrc

public void setSrc(java.io.File src)

setDest

public void setDest(java.io.File dest)

execute

public void execute()


Copyright © Jon Tirsen. All Rights Reserved.