org.intermine.task
Class DynamicAttributeTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.intermine.task.DynamicAttributeTask
Direct Known Subclasses:
ConverterTask, PostProcessOperationsTask, PostProcessorTask

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

An ant task that provides a method for setting attributes dynamically within a class. Typically a sub class of this task will have a handle to a class that does some work for it, but in order to make the class reusable, it's properties are factored out into either a config or a build file. The task subclass can use the configureDynamicAttributes method, along with some properties that have been set at runtime to initialize the helper/worker class.


Field Summary
protected static org.apache.log4j.Logger LOG
           
 
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
DynamicAttributeTask()
           
 
Method Summary
protected  void configureDynamicAttributes(java.lang.Object bean)
          Look at set methods on a target object and lookup values in project properties.
 
Methods inherited from class org.apache.tools.ant.Task
execute, 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

LOG

protected static final org.apache.log4j.Logger LOG
Constructor Detail

DynamicAttributeTask

public DynamicAttributeTask()
Method Detail

configureDynamicAttributes

protected void configureDynamicAttributes(java.lang.Object bean)
Look at set methods on a target object and lookup values in project properties. If no value found property will not be set but no error will be thrown.

Parameters:
bean - an object to search for setter methods