org.bsf.smartValueObject.tools
Class SmartTask

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.apache.tools.ant.taskdefs.MatchingTask
                    |
                    +--org.bsf.smartValueObject.tools.SmartTask
All Implemented Interfaces:
org.apache.tools.ant.types.selectors.SelectorContainer

public class SmartTask
extends org.apache.tools.ant.taskdefs.MatchingTask

Ant task to do bytecode modification on compile time. Relies on a concrete implementation of Instrumentor.

 <smartify instrumentor="org.bsf.smartValueObject.tools.JavaAssistInstrumentor">
      <fileset dir="${build.dir}/test">
               <include name="*VO.class"/>
      </fileset>
 </smartify>
 


Field Summary
private  java.util.Vector filesets
           
private  java.lang.String instrumentor
          The classname of the instrumentor to use.
 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset, useDefaultExcludes
 
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
SmartTask()
           
 
Method Summary
 void addFileset(org.apache.tools.ant.types.FileSet f)
           
 void execute()
           
 java.lang.String getInstrumentor()
           
private  org.bsf.smartValueObject.tools.Instrumentor getInstrumentorInstance()
          Gets an concrete instrumentor instance.
 void setInstrumentor(java.lang.String s)
          Name of a class implementing org.bsf.smartValueObject.tools.Instrumentor.
private  void smartify(java.lang.String basedir, java.lang.String[] files)
          Smartify all files.
 
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
addAnd, addContains, addCustom, addDate, addDepend, addDepth, addFilename, addMajority, addNone, addNot, addOr, addPresent, addSelector, addSize, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filesets

private java.util.Vector filesets

instrumentor

private java.lang.String instrumentor
The classname of the instrumentor to use.

Constructor Detail

SmartTask

public SmartTask()
Method Detail

addFileset

public void addFileset(org.apache.tools.ant.types.FileSet f)

setInstrumentor

public void setInstrumentor(java.lang.String s)
Name of a class implementing org.bsf.smartValueObject.tools.Instrumentor.

Parameters:
s - implementation to use.
See Also:
Instrumentor

getInstrumentor

public java.lang.String getInstrumentor()

execute

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

smartify

private void smartify(java.lang.String basedir,
                      java.lang.String[] files)
Smartify all files. Gets called by execute().

Parameters:
basedir - relative directory
files - list of files as specified by the fileset-tag.

getInstrumentorInstance

private org.bsf.smartValueObject.tools.Instrumentor getInstrumentorInstance()
Gets an concrete instrumentor instance.