ch.oscg.jreleaseinfo
Class SourceGeneratorApp
java.lang.Object
ch.oscg.jreleaseinfo.SourceGenerator
ch.oscg.jreleaseinfo.SourceGeneratorApp
- All Implemented Interfaces:
- SourceGeneratorIF
- public class SourceGeneratorApp
- extends SourceGenerator
The SourceGenerator is a simple implementation of the
SourceGeneratorIF interface. In this class the code to be
generated is hard coded.
This implementation adds code which shows the
build information in a frame as default main-class of
the jar file.
This is usefull for libraries, which do not have a main-class
definition in the manifest.
- Version:
- $Revision: 1.2 $ ($Date: 2005/08/06 14:11:18 $ / $Author: tcotting $)
- Author:
- Thomas Cotting, Tangarena Engineering AG, Luzern
Method Summary |
java.lang.String |
createCode()
Utility method to write the class java code to a String.
|
protected void |
createMainMethod(java.lang.StringBuffer buf,
java.lang.String filename)
Utility method to write a the code for the main method. |
protected void |
createViewerClass(java.lang.StringBuffer buf,
java.lang.String viewerType)
Utility method to write a the code for the viewer class. |
Methods inherited from class ch.oscg.jreleaseinfo.SourceGenerator |
createClassFooter, createClassHeader, createClassInfoHeader, createMethods, setClassName, setPackageName, setProperties, writeDateMethod, writeln, writeln, writeMethodDeclaration, writeObjectDeclaration, writeObjectMethod |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SourceGeneratorApp
public SourceGeneratorApp()
- Default constructor.
createCode
public java.lang.String createCode()
- Utility method to write the class java code to a String.
This methods overwrites the method from SourceGenerator,
adding code through createViewerCall().
- Specified by:
createCode
in interface SourceGeneratorIF
- Overrides:
createCode
in class SourceGenerator
- Returns:
- the created java class in a string
createViewerClass
protected void createViewerClass(java.lang.StringBuffer buf,
java.lang.String viewerType)
- Utility method to write a the code for the viewer class.
- Parameters:
buf
- StringBuffer to write into
createMainMethod
protected void createMainMethod(java.lang.StringBuffer buf,
java.lang.String filename)
- Utility method to write a the code for the main method.
- Parameters:
buf
- StringBuffer to write into
Copyright © 2005 Open Source Competence Group (OSCG). All Rights Reserved.