com.ashridgetech.jamda.transform
Class CodeGenTransformer

java.lang.Object
  |
  +--com.ashridgetech.jamda.transform.AbstractModelTransformer
        |
        +--com.ashridgetech.jamda.transform.CodeGenTransformer
All Implemented Interfaces:
ModelTransformer

public class CodeGenTransformer
extends AbstractModelTransformer

A ModelTransformer which can generate code files from a UML Model. It does not make changes to the Model. Must be configured with the directory to which the source code is generated, as well as the configuration required by AbstractModelTransformer.

Author:
Paul Boocock version 1.0
See Also:
CodeGenTransformerSpec

Nested Class Summary
 
Nested classes inherited from class com.ashridgetech.jamda.transform.AbstractModelTransformer
AbstractModelTransformer.Config
 
Nested classes inherited from class com.ashridgetech.jamda.transform.ModelTransformer
ModelTransformer.TransformException
 
Constructor Summary
CodeGenTransformer()
          Construct a CodeGenTransformer, setting the element transformer superclass to UmlTypeGenerator.
 
Method Summary
 java.lang.String getDescription()
          Get a short description of this transformer, including details of its configuration.
 java.io.File getDirectory()
          Get the top level directory for the output files.
protected  UmlTypeGenerator makeGenerator(StructuredType element)
          Create a UmlTypeGenerator which can be used to generate the code for a class.
 void setDirectory(java.io.File directory)
          Set the the top level directory for the output files.
 void transform(Model model)
          Generate code for certain classes in a Model.
 
Methods inherited from class com.ashridgetech.jamda.transform.AbstractModelTransformer
addStereotypeName, getConfig, getStereotypeNames, selectElements, setStereotypeName, standardElementDefs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeGenTransformer

public CodeGenTransformer()
Construct a CodeGenTransformer, setting the element transformer superclass to UmlTypeGenerator.

Method Detail

getDirectory

public java.io.File getDirectory()
Get the top level directory for the output files.

Returns:
the top of the package structure

setDirectory

public void setDirectory(java.io.File directory)
Set the the top level directory for the output files.

Parameters:
directory - top of the package structure

transform

public void transform(Model model)
               throws ModelTransformer.TransformException
Generate code for certain classes in a Model.

Parameters:
model - the Model on which to operate
ModelTransformer.TransformException

getDescription

public java.lang.String getDescription()
Get a short description of this transformer, including details of its configuration.

Specified by:
getDescription in interface ModelTransformer
Overrides:
getDescription in class AbstractModelTransformer
Returns:
the description

makeGenerator

protected UmlTypeGenerator makeGenerator(StructuredType element)
                                  throws ModelTransformer.TransformException
Create a UmlTypeGenerator which can be used to generate the code for a class.

Parameters:
element - the UML element for which a generator is needed
Returns:
the generator
ModelTransformer.TransformException


Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.