|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaxx.compiler.JAXXCompilerLaunchor
public class JAXXCompilerLaunchor
| Nested Class Summary | |
|---|---|
protected static class |
JAXXCompilerLaunchor.LifeCycle
|
| Field Summary | |
|---|---|
protected java.lang.String[] |
classNames
original list of classes to compile |
protected int |
compilerCount
|
protected java.util.Map<java.lang.String,JAXXCompiler> |
compilers
Maps the names of classes being compiled to the compiler instance handling the compilation. |
protected JAXXCompilerLaunchor.LifeCycle |
currentPass
|
protected int |
errorCount
|
protected java.io.File[] |
files
original list of files to compile |
protected java.util.List<java.lang.String> |
jaxxFileClassNames
Class names corresponding to the files in the jaxxFiles list. |
protected java.util.List<java.io.File> |
jaxxFiles
Files to be treated while compilation. |
protected static org.apache.commons.logging.Log |
log
log |
protected CompilerOptions |
options
options of the launchor and underlines compilers |
protected JAXXProfile |
profiler
|
protected static JAXXCompilerLaunchor |
singleton
shared instance of unique launchor at a givne time. |
protected java.util.Map<java.io.File,SymbolTable> |
symbolTables
Maps the names of classes being compiled to their symbol tables (created after the first compiler pass). |
protected int |
warningCount
|
| Constructor Summary | |
|---|---|
protected |
JAXXCompilerLaunchor(java.io.File[] files,
java.lang.String[] classNames,
CompilerOptions options)
|
| Method Summary | |
|---|---|
static void |
addProfileTime(JAXXCompiler compiler,
java.lang.String key)
|
boolean |
compile()
Compiled a set of files. |
static JAXXCompiler |
createDummyCompiler()
Creates a dummy Compiler for use in unit testing. |
static JAXXCompiler |
createDummyCompiler(java.lang.ClassLoader classLoader)
Creates a dummy Compiler for use in unit testing. |
static JAXXCompilerLaunchor |
get()
|
protected JAXXCompiler |
getCompiler(java.lang.String className,
java.lang.String message)
|
int |
getCompilerCount()
|
JAXXCompiler |
getJAXXCompiler(java.lang.String className)
|
java.lang.String |
getLineSeparator()
Returns the system line separator string. |
SymbolTable |
getSymbolTable(java.lang.String className)
|
java.lang.String |
getVersion()
|
void |
init()
|
static boolean |
isRegistred()
|
static void |
loadLibraries(boolean verbose)
Load the Initializer services found via theServiceLoader mecanism. |
protected JAXXCompiler |
newCompiler(java.io.File parentFile,
java.io.File file,
java.lang.String className)
|
static JAXXCompilerLaunchor |
newLaunchor()
Create a new empty launchor and set it as current launchor accessible via method get() |
static JAXXCompilerLaunchor |
newLaunchor(java.io.File[] files,
java.lang.String[] classNames,
CompilerOptions options)
Create a new launchor and set it as current launchor accessible via method get(). |
static JAXXCompilerLaunchor |
newLaunchor(java.io.File base,
java.lang.String[] relativePaths,
CompilerOptions options)
Create a new launchor and set it as current launchor accessible via method get(). |
protected boolean |
nextStep(JAXXCompilerLaunchor.LifeCycle nextCycle,
boolean success)
|
protected boolean |
report(boolean success)
|
protected void |
reset()
Resets all state in preparation for a new compilation session. |
protected static void |
showUsage()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
protected static JAXXCompilerLaunchor singleton
protected CompilerOptions options
protected final java.io.File[] files
protected final java.lang.String[] classNames
protected java.util.List<java.io.File> jaxxFiles
protected java.util.List<java.lang.String> jaxxFileClassNames
protected java.util.Map<java.lang.String,JAXXCompiler> compilers
protected java.util.Map<java.io.File,SymbolTable> symbolTables
protected JAXXCompilerLaunchor.LifeCycle currentPass
protected int errorCount
protected int warningCount
protected int compilerCount
protected JAXXProfile profiler
| Constructor Detail |
|---|
protected JAXXCompilerLaunchor(java.io.File[] files,
java.lang.String[] classNames,
CompilerOptions options)
| Method Detail |
|---|
public static JAXXCompilerLaunchor newLaunchor()
get()
public static JAXXCompilerLaunchor newLaunchor(java.io.File base,
java.lang.String[] relativePaths,
CompilerOptions options)
get().
The launchor will be prepared to compile a set of files, expressed as paths relative to a base directory.
The class names of the compiled files are derived from the relative path strings
(e.g. "example/Foo.jaxx" compiles into a class named "example.Foo").
base - the directory against which to resolve relative pathsrelativePaths - a list of relative paths to .jaxx files being compiledoptions - the compiler options to use
public static JAXXCompilerLaunchor newLaunchor(java.io.File[] files,
java.lang.String[] classNames,
CompilerOptions options)
get().
The launchor will be prepared to compile a set of files, with the class names specified explicitly.
The class compiled from files[i] will be named classNames[i].
files - the .jaxx files to compileclassNames - the names of the classes being compiledoptions - the compiler options to use
public static JAXXCompilerLaunchor get()
throws java.lang.NullPointerException
java.lang.NullPointerException - if no launchor was registred via a newLaunchor-like method.public static boolean isRegistred()
if there is a launchor registred, false otherwise.public static void loadLibraries(boolean verbose)
Initializer services found via theServiceLoader mecanism.
verbose - public void init()
protected void reset()
public java.lang.String getVersion()
public static JAXXCompiler createDummyCompiler()
public static JAXXCompiler createDummyCompiler(java.lang.ClassLoader classLoader)
classLoader - class loader to use
public JAXXCompiler getJAXXCompiler(java.lang.String className)
className - the name of the class to use
public SymbolTable getSymbolTable(java.lang.String className)
className - the name of the class to use
null if no such symbol table could be found.public java.lang.String getLineSeparator()
public boolean compile()
true if compilation succeeds, false otherwisepublic int getCompilerCount()
protected JAXXCompiler getCompiler(java.lang.String className,
java.lang.String message)
protected boolean nextStep(JAXXCompilerLaunchor.LifeCycle nextCycle,
boolean success)
protected boolean report(boolean success)
protected JAXXCompiler newCompiler(java.io.File parentFile,
java.io.File file,
java.lang.String className)
throws java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.NoSuchMethodException
public static void addProfileTime(JAXXCompiler compiler,
java.lang.String key)
protected static void showUsage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||