ch.sahits.codegen.generator
Interface IGenerator

All Superinterfaces:
IBaseGenerator
All Known Subinterfaces:
IJetCodeGenerator
All Known Implementing Classes:
AbstractGenerator, AbstractJETASTGenerator, AbstractJETTemplateGenerator, ASTBeanWithDelete, ASTGenerator, DAOGenerator, InitializableDbBeanGenerator, JETASTGenerator, JETGateway

public interface IGenerator
extends IBaseGenerator

This interface defines the common method of any code generator

Since:
0.9.0
Author:
Andi Hotz

Method Summary
 void cleanup()
          Clean up the resources needed for the generation that are no further needed
 IJetGatewayConfiguration getConfig()
          Get the configuration of the generator
 int getWorkload()
          Define how expensive the generation process is.
 void init()
          Initialize the generator
 IFile save(IProgressMonitor monitor, byte[] contents)
          Save the generated code in a file
 void setMonitor(IProgressMonitor monitor)
          Set the monitor for the progress
 
Methods inherited from interface ch.sahits.codegen.generator.IBaseGenerator
generate, init, isInitialized
 

Method Detail

init

void init()
Initialize the generator


setMonitor

void setMonitor(IProgressMonitor monitor)
Set the monitor for the progress

Parameters:
monitor - the monitor to set

save

IFile save(IProgressMonitor monitor,
           byte[] contents)
           throws CoreException
Save the generated code in a file

Parameters:
monitor - progress monitor
contents - bytes to be saved
Returns:
IFile instance
Throws:
CoreException

cleanup

void cleanup()
             throws CoreException
Clean up the resources needed for the generation that are no further needed

Throws:
CoreException

getWorkload

int getWorkload()
Define how expensive the generation process is.

Returns:
number of work-units

getConfig

IJetGatewayConfiguration getConfig()
Get the configuration of the generator

Returns:
Configuration