org.objectweb.speedo.generation.generator
Class AbstractGenerator
java.lang.Object
org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
org.objectweb.speedo.generation.generator.AbstractGenerator
- All Implemented Interfaces:
- GeneratorComponent
- Direct Known Subclasses:
- EJBGenerator, JDOGenerator
public abstract class AbstractGenerator
- extends AbstractGeneratorComponent
This class generates files "po", "manager" and "fields" for persistence capable classes.
- Author:
- S. Chassande-Barrioz
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER_NAME
public static final java.lang.String LOGGER_NAME
- See Also:
- Constant Field Values
AbstractGenerator
public AbstractGenerator(Personality p)
getGenerators
protected abstract AbstractVelocityGenerator[] getGenerators()
- Provides the list of generators to be used in the code generation for
a particular persistent class.
- Returns:
- The list as an array of generators.
init
public boolean init()
- 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.
getTitle
public java.lang.String getTitle()
- Specified by:
getTitle
in interface GeneratorComponent
- Overrides:
getTitle
in class AbstractGeneratorComponent
- Returns:
- a short string (less than 30 characters) representing the
title of the component. This string must indicate job of the component.
getSummary
public java.lang.String getSummary()
- Specified by:
getSummary
in interface GeneratorComponent
- Overrides:
getSummary
in class AbstractGeneratorComponent
- Returns:
- a short string (less than 50 characters) summarizing the job of
component (ex: how many files generated or compiled, ...)
process
public void process()
throws SpeedoException
- Generation all files , and Fields.
If a previous task on a class has failed, the methods doesn't create
files for this class.
- Specified by:
process
in interface GeneratorComponent
- Specified by:
process
in class AbstractGeneratorComponent
- Throws:
SpeedoException
- if there is a problem during writing
the new files and the boolean failsonerror is set on true.