org.objectweb.speedo.generation
Class AbstractEnhancer

java.lang.Object
  extended by org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
      extended by org.objectweb.speedo.generation.AbstractEnhancer
All Implemented Interfaces:
GeneratorComponent
Direct Known Subclasses:
EJBEnhancer, JDOEnhancer

public abstract class AbstractEnhancer
extends AbstractGeneratorComponent

Is the global engine of the Speedo enhancer/Compiler. This engine launches the different steps of the enhancement. Each step is realized by a GeneratorComponent implementation. This implementation is a GeneratorComponent itself. The list of used generator component is defined by the abstract method #getGeneratorComponents()

Author:
S.Chassande-Barrioz

Field Summary
 
Fields inherited from class org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
debug, logger, personality, scp
 
Constructor Summary
AbstractEnhancer(Personality p)
           
 
Method Summary
protected abstract  GeneratorComponent[] getGeneratorComponents()
           
 SpeedoCompilerParameter getSpeedoCompilerParameter()
          Retrieves the parameters holder
 boolean init()
          Initializes the component
 void process()
          Do the job of the component.
 
Methods inherited from class org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
getLogger, getSummary, getTitle, setLogger, setSpeedoCompilerParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEnhancer

public AbstractEnhancer(Personality p)
Method Detail

getGeneratorComponents

protected abstract GeneratorComponent[] getGeneratorComponents()
Returns:
the array of GeneratorComponent class to use. This array defines the different step of the Speedo enhancer.
See Also:
GeneratorComponent

getSpeedoCompilerParameter

public SpeedoCompilerParameter getSpeedoCompilerParameter()
Description copied from interface: GeneratorComponent
Retrieves the parameters holder

Specified by:
getSpeedoCompilerParameter in interface GeneratorComponent
Overrides:
getSpeedoCompilerParameter in class AbstractGeneratorComponent

init

public boolean init()
             throws SpeedoException
Description copied from interface: GeneratorComponent
Initializes the component

Specified by:
init in interface GeneratorComponent
Specified by:
init in class AbstractGeneratorComponent
Returns:
boolean value indicating if the process method can be called.
Throws:
SpeedoException - if the component initialization fails

process

public void process()
             throws SpeedoException
Description copied from interface: GeneratorComponent
Do the job of the component.

Specified by:
process in interface GeneratorComponent
Specified by:
process in class AbstractGeneratorComponent
Throws:
SpeedoException - if the component initialization fails