com.ashridgetech.jamda.config
Class ModelTransformerSpec

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--com.ashridgetech.jamda.config.ModelTransformerSpec
Direct Known Subclasses:
AbstractModelTransformerSpec

public class ModelTransformerSpec
extends org.apache.tools.ant.ProjectComponent

The transformer element within the Jamda Ant Task .

Author:
Paul Boocock version 1.0

Field Summary
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
ModelTransformerSpec()
           
 
Method Summary
protected  void configureTransformer(ModelTransformer transformer)
          Configure the ModelTransformer specified by this class.
 TransformerConfig createConfig()
          Add a config element to this task.
 ModelTransformer getConfiguredTransformer()
           
protected  ModelTransformer getTransformer()
           
protected  java.lang.Class loadClass(java.lang.String classname)
          Load named class either via the system classloader or a given custom classloader.
 void setClassName(java.lang.String className)
          Set the name of the ModelTransformer class.
 void setClasspath(org.apache.tools.ant.types.Path classpath)
          Set the optional classpath to the Model Transformer
 void setClasspathRef(org.apache.tools.ant.types.Reference r)
          Set the reference to an optional classpath to the Model Transformer
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, log, log, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelTransformerSpec

public ModelTransformerSpec()
Method Detail

setClasspath

public void setClasspath(org.apache.tools.ant.types.Path classpath)
Set the optional classpath to the Model Transformer

Parameters:
classpath - the classpath to use when loading the Model Transformer

setClasspathRef

public void setClasspathRef(org.apache.tools.ant.types.Reference r)
Set the reference to an optional classpath to the Model Transformer

Parameters:
r - the id of the Ant path instance to act as the classpath for loading the Model Transformer

setClassName

public void setClassName(java.lang.String className)
Set the name of the ModelTransformer class.

Parameters:
className - the name of the class

createConfig

public TransformerConfig createConfig()
Add a config element to this task. This will be of the type supplied by the ModelTransformer class specified to setClassName(java.lang.String).

Returns:
the TransformerConfig class for the ModelTransformer required

configureTransformer

protected void configureTransformer(ModelTransformer transformer)
Configure the ModelTransformer specified by this class. If overridden by subclass, subclass method should call super method.

Parameters:
transformer - the transformer to be configured - must not be null

getTransformer

protected ModelTransformer getTransformer()

getConfiguredTransformer

public ModelTransformer getConfiguredTransformer()

loadClass

protected java.lang.Class loadClass(java.lang.String classname)
                             throws org.apache.tools.ant.BuildException
Load named class either via the system classloader or a given custom classloader. Based on loadClass in the Ant XSLTProcess task.

Parameters:
classname - the name of the class to load.
Returns:
the requested class.
org.apache.tools.ant.BuildException


Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.