|
||||||||||
| 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.generator.JETGateway
public class JETGateway
This class encapsulates access to the JET and JMerge packages.
| Constructor Summary | |
|---|---|
JETGateway()
Default constructor |
|
| Method Summary | |
|---|---|
void |
cleanup()
Delete the JETEmitter project. |
java.lang.String |
generate()
Generate the code by passing the call to generate(IProgressMonitor) |
java.lang.String |
generate(IProgressMonitor _monitor)
Invokes the JETemplate specified in the Config with the
model specified in the Config and returns the generated text
as a String. |
JETEmitter |
getJETEmitter()
Retrieve a JETEmitter. |
int |
getWorkload()
Define how expensive the generation process is. |
void |
init()
Initialize the monitor |
void |
init(IJetGatewayConfiguration config)
Initialize the configuration This initializing method is called by the generators once the Object is created dynamically |
boolean |
isInitialized()
Check whether the generator is properly 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 |
| Constructor Detail |
|---|
public JETGateway()
| Method Detail |
|---|
public void init(IJetGatewayConfiguration config)
init in interface IBaseGeneratorconfig -
public java.lang.String generate(IProgressMonitor _monitor)
throws CoreException
Config with the
model specified in the Config and returns the generated text
as a String.
This implementation uses a JETEmitter to translate the
template to a Java implementation class. The translated class is created in
a hidden project called .JETEmitters.
In order to be able to compile the translated template implementation
class, the classes used by the model specified in the Config
must be availabel in the classpath. For this reason, this method sets the
first runtime library of the plugin specified in the Config
as a classpath variable to the .JETEmitters project.
_monitor - the progress monitor to use. May be null.
CoreExceptionpublic java.lang.String generate()
generate(IProgressMonitor)
generate in interface IBaseGeneratorpublic void init()
init in interface IGeneratorpublic final void setMonitor(IProgressMonitor _monitor)
setMonitor in interface IGenerator_monitor - the monitor to set
public void cleanup()
throws CoreException
cleanup in interface IGeneratorCoreExceptionpublic int getWorkload()
getWorkload in interface IGeneratorpublic boolean isInitialized()
isInitialized in interface IBaseGeneratorpublic final JETEmitter getJETEmitter()
JETEmitterInitializer.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||