|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.compiler.JavaCompiler
public class JavaCompiler
Java compilation tool. Supports following compilers:
| Field Summary | |
|---|---|
protected java.lang.String |
argDebug
|
protected java.lang.String |
argEncoding
|
protected java.lang.String |
argSource
|
protected java.lang.String |
argTarget
|
protected java.lang.String |
classpath
|
protected static java.lang.String[] |
COMPILERS
|
protected java.lang.String |
compilerSpec
|
protected boolean |
haveToolsJar
|
protected boolean |
useJikes
|
| Constructor Summary | |
|---|---|
JavaCompiler()
Creates new java compiler. |
|
| Method Summary | |
|---|---|
void |
appendClasspath(java.lang.String... classpathItems)
Add more classpath after default one. |
void |
compile(java.io.File sourceFile,
java.lang.String className,
java.io.File sourceDirectoryFile,
java.io.File outputDirectoryFile)
|
void |
compile(java.lang.String source)
|
void |
setCompilerSpec(java.lang.String compiler)
Specifies new java compiler specification. |
void |
setDebug(boolean debug)
Sets debug argument. |
void |
setEncoding(java.lang.String encoding)
Sets encoding. |
void |
setSourceVersion(java.lang.String source)
|
void |
setTargetVersion(java.lang.String target)
|
void |
setUseJikes(boolean useJikes)
Enables or disables jikes compiler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String[] COMPILERS
protected java.lang.String classpath
protected java.lang.String compilerSpec
protected java.lang.String argDebug
protected java.lang.String argEncoding
protected java.lang.String argSource
protected java.lang.String argTarget
protected boolean haveToolsJar
protected boolean useJikes
| Constructor Detail |
|---|
public JavaCompiler()
| Method Detail |
|---|
public void setCompilerSpec(java.lang.String compiler)
-nowarn -sourcepath %s -d %d %f.
The whole command line can be set in here, but it also can be set via properties of this class.
public void setUseJikes(boolean useJikes)
public void appendClasspath(java.lang.String... classpathItems)
public void setDebug(boolean debug)
public void setEncoding(java.lang.String encoding)
public void setSourceVersion(java.lang.String source)
public void setTargetVersion(java.lang.String target)
public void compile(java.lang.String source)
throws java.io.IOException
java.io.IOException
public void compile(java.io.File sourceFile,
java.lang.String className,
java.io.File sourceDirectoryFile,
java.io.File outputDirectoryFile)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||