ch.oscg.jreleaseinfo
Class SourceGenerator

java.lang.Object
  extended by ch.oscg.jreleaseinfo.SourceGenerator
All Implemented Interfaces:
SourceGeneratorIF
Direct Known Subclasses:
SourceGeneratorApp

public class SourceGenerator
extends java.lang.Object
implements SourceGeneratorIF

The SourceGenerator is a simple implementation of the SourceGeneratorIF interface. In this class the code to be generated is hard coded.
Other implementation may provide extensions (like SourceGeneratorApp) or other mechanism (like using a template engine, etc).

Version:
$Revision: 1.3 $ ($Date: 2005/08/06 14:12:36 $ / $Author: tcotting $)
Author:
Thomas Cotting, Tangarena Engineering AG, Luzern

Constructor Summary
SourceGenerator()
          Default constructor.
 
Method Summary
 java.lang.String createCode()
          Utility method to write the class java code to a String.
 void setClassName(java.lang.String className)
          Set the classname.
 void setPackageName(java.lang.String packageName)
          Set the packagename.
 void setProperties(java.util.Map props)
          Set the property map.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceGenerator

public SourceGenerator()
Default constructor.

Method Detail

setPackageName

public void setPackageName(java.lang.String packageName)
Set the packagename.

Specified by:
setPackageName in interface SourceGeneratorIF
Parameters:
packageName -

setClassName

public void setClassName(java.lang.String className)
Set the classname.

Specified by:
setClassName in interface SourceGeneratorIF
Parameters:
className -

setProperties

public void setProperties(java.util.Map props)
Set the property map.

Specified by:
setProperties in interface SourceGeneratorIF
Parameters:
property - map

createCode

public java.lang.String createCode()
Utility method to write the class java code to a String.

Specified by:
createCode in interface SourceGeneratorIF
Returns:
the created java class in a string