org.objectweb.speedo.generation.compiler
Class Compiler
java.lang.Object
org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
org.objectweb.speedo.generation.compiler.Compiler
- All Implemented Interfaces:
- GeneratorComponent
public class Compiler
- extends AbstractGeneratorComponent
Compiles all generated .java
files.
This class is based on Ant that is a Java-based build tool (see http://jakarta.apache.org/ant for more information).
- Author:
- S.Chassande-Barrioz
Method Summary |
java.lang.String |
getSummary()
|
java.lang.String |
getTitle()
|
boolean |
init()
Initializes this Compiler. |
void |
process()
Tries to process the compilation internally. |
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
SEPARATOR
public static final char SEPARATOR
- System separator character (e.g '/' under Unix systems)
compiler
protected org.apache.tools.ant.taskdefs.Javac compiler
- Ant Task intended to java compilation
Compiler
public Compiler(Personality p)
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, ...)
init
public boolean init()
- Initializes this Compiler.
- Initializes the Ant Task Javac so that it could compiles all generated classes.
- Sets the classpath, the source files, the destination directory and the other parameters.
- Specified by:
init
in interface GeneratorComponent
- Specified by:
init
in class AbstractGeneratorComponent
- Returns:
- boolean value indicating if the process method can be called.
process
public void process()
throws SpeedoException
- Tries to process the compilation internally.
- Specified by:
process
in interface GeneratorComponent
- Specified by:
process
in class AbstractGeneratorComponent
- Throws:
SpeedoException
- if compilation fails