|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.sahits.codegen.generator.AbstractGenerator
ch.sahits.codegen.java.generator.ast.ASTGenerator
public final class ASTGenerator
This generator generates the java file by generating the rump with JET.
If no explicit JET template is supplied a generic JET file produces
the rump.
To define another JET Generator class the method getJetGenerator()
must be overridden.
| Field Summary | |
|---|---|
protected AST |
ast
Representation of the source-code to be generated as an abstract syntax tree. |
static int |
AST_STATIC_WORKLOAD
static estimation of the AST part of the work load |
protected boolean |
initialized
|
protected CompilationUnit |
unit
The compilation unit that will be generated |
| Constructor Summary | |
|---|---|
ASTGenerator()
Default constructor |
|
| Method Summary | |
|---|---|
void |
cleanup()
Clean up the mess |
java.lang.String |
generate()
Pass the generation to the specified generator class. |
int |
getWorkload()
Take the workload for the generation of the JET file and add 3 |
void |
init()
Generate the basic class implementation with JET |
void |
init(IJetGatewayConfiguration config)
Initialize the configuration |
boolean |
isInitialized()
Check whether all members are initialized |
void |
setMonitor(IProgressMonitor _monitor)
Set the monitor for the progress |
| Methods inherited from class ch.sahits.codegen.generator.AbstractGenerator |
|---|
createIfNull, findOrCreateContainer, getConfig, save, setConfig |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ch.sahits.codegen.generator.IGenerator |
|---|
getConfig, save |
| Field Detail |
|---|
public static final int AST_STATIC_WORKLOAD
protected AST ast
protected CompilationUnit unit
protected boolean initialized
| Constructor Detail |
|---|
public ASTGenerator()
| Method Detail |
|---|
public void cleanup()
throws CoreException
cleanup in interface IGeneratorCoreExceptionpublic java.lang.String generate()
generate in interface IBaseGeneratorpublic int getWorkload()
getWorkload in interface IGeneratorpublic void init()
init in interface IGeneratorpublic void setMonitor(IProgressMonitor _monitor)
IGenerator
setMonitor in interface IGenerator_monitor - public boolean isInitialized()
isInitialized in interface IBaseGeneratorpublic void init(IJetGatewayConfiguration config)
init in interface IBaseGeneratorconfig - Configuration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||