ch.sahits.codegen.generator
Interface IGeneralGenerator

All Known Subinterfaces:
IGeneralFileGenerator, IGeneralStringGenerator
All Known Implementing Classes:
Axis2MessageInOutReciever, Axis2ServiceStubGenerator, Axis2ServiceXMLGenerator, HibernateConfigurationCreator, PHPCodeGenerator, WSDLGenerator, XMLStringOutput

public interface IGeneralGenerator

This interface defines the methods needed for a general generator class. Any implementing class must provide a Default constructor. This interface should not be implemented directly but through one of the subinterfaces IGeneralStringGenerator or IGeneralFileGenerator.

Since:
1.2.0
Author:
Andi Hotz

Method Summary
 IGeneratedObject createModel(IProgressMonitor monitor, IOutputFileModel model)
          Create an arbitrary model for the generator class.
 void init(IOutputFileModel outputModel, IGeneratedObject model)
          Initialize the model this generators model The exact type of the model is arbitrary to the implementing class.
 boolean isGeneratedOutputFile()
          Check if the generated output is a file instance or a String
 

Method Detail

init

void init(IOutputFileModel outputModel,
          IGeneratedObject model)
Initialize the model this generators model The exact type of the model is arbitrary to the implementing class. If the model is not of this type a ClassCastException is thrown

Parameters:
outputModel - IOutputFileModel that defines the setup of the generation
model - of arbitrary type

isGeneratedOutputFile

boolean isGeneratedOutputFile()
Check if the generated output is a file instance or a String

Returns:
true if the the implementing class imlements IGeneralFileGenerator. False if the implementing class implements IGeneralStringGenerator.

createModel

IGeneratedObject createModel(IProgressMonitor monitor,
                             IOutputFileModel model)
Create an arbitrary model for the generator class.

Parameters:
monitor - Monitor for the progress of the model creation
model - Model of the data of the wizard
Returns:
Object model that is passed as the second parameter to init(IOutputFileModel, IGeneratedObject)