|
terp - the Codemesh Modular Template Interpreter v1.3.304 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.codemesh.terp.api.Executor.AbstractExecutor<ProcessExecutor.Result>
com.codemesh.terp.eval.executors.ProcessExecutor
com.codemesh.terp.eval.executors.ShellExecutor
com.codemesh.terp.eval.executors.BatchExecutor
com.codemesh.terp.eval.executors.JavaToolExecutor<T>
public abstract class JavaToolExecutor<T extends JavaToolExecutor>
The baseclass for Java tool executors. Java tools are the executables in the JDK's bin directory. They include tools such as javac, jaavadoc, jar, etc.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.codemesh.terp.eval.executors.ProcessExecutor |
|---|
ProcessExecutor.Result |
| Nested classes/interfaces inherited from interface com.codemesh.terp.api.Executor |
|---|
Executor.AbstractExecutor<T>, Executor.ForMethod |
| Field Summary | |
|---|---|
protected static boolean |
bIsWindows
|
protected static java.lang.String |
COMPILER
|
protected static java.lang.String |
EXECUTABLE
|
protected static java.lang.String |
JAR_EXE_NAME
|
protected static java.lang.String |
JAVA_EXE_NAME
|
protected static java.lang.String |
JAVAC_EXE_NAME
|
protected static java.lang.String |
JAVADOC_EXE_NAME
|
protected static java.lang.String |
JDK
|
protected static java.lang.String |
JRE
|
protected static java.util.logging.Logger |
logger
|
protected static java.lang.String |
MAKER
|
protected Jdk |
theJdk
|
protected static OS |
theOS
|
protected static ToFile |
TO_FILE
|
protected static ToJdk |
TO_JDK
|
protected static ToJre |
TO_JRE
|
protected static ToVersion |
TO_VERSION
|
protected static java.lang.String |
VERSION
|
| Fields inherited from class com.codemesh.terp.eval.executors.ShellExecutor |
|---|
theExecFlag, theShell, TO_STRING |
| Fields inherited from class com.codemesh.terp.eval.executors.ProcessExecutor |
|---|
EOL, IS_WINDOWS, theEnvironment, theExecutable, theWorkingDir, TO_LIST |
| Constructor Summary | |
|---|---|
JavaToolExecutor()
|
|
| Method Summary | ||
|---|---|---|
ProcessExecutor.Result |
batchExecute(java.util.List<java.lang.Object> args)
|
|
ProcessExecutor.Result |
execute(java.util.List<java.lang.Object> args,
TerpEvaluator eval,
TerpContext ctx)
Performs the executor's action on the given arguments in the given context. |
|
static
|
fromMap(JavaToolExecutor<T> exec,
java.util.Map<java.lang.String,java.lang.Object> map)
|
|
protected abstract java.lang.String |
getExeName()
Returns the tool's executable name. |
|
Jdk |
getJdk()
Returns the JDK to which the java compiler executor belongs. |
|
java.lang.String |
getMaker()
Returns a code for the maker of the JRE. |
|
abstract java.lang.String |
getName()
Returns the named object's name. |
|
protected abstract T |
getTool()
Returns the tool from the JDK. |
|
Version |
getVersion()
Returns the Java version as reported by running the java executable with the -version argument. |
|
void |
setJdk(Jdk jdk)
Sets the JDK to which this compiler executor belongs. |
|
| Methods inherited from class com.codemesh.terp.eval.executors.BatchExecutor |
|---|
batchFromFile, batchFromMap, batchFromMap, batchFromString, writeCommandsFile |
| Methods inherited from class com.codemesh.terp.eval.executors.ShellExecutor |
|---|
createEnvironment, getExecFlag, getShell, marshallArguments, setExecFlag, setShell, shellFromFile, shellFromMap, shellFromMap, shellFromString |
| Methods inherited from class com.codemesh.terp.eval.executors.ProcessExecutor |
|---|
execute, fromFile, fromMap, fromMap, fromString, getEnvironment, getExecutable, getWorkingDir, matches, setEnvironment, setExecutable, setWorkingDir |
| Methods inherited from class com.codemesh.terp.api.Executor.AbstractExecutor |
|---|
execute |
| 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 JAVA_EXE_NAME
protected static final java.lang.String JAVAC_EXE_NAME
protected static final java.lang.String JAVADOC_EXE_NAME
protected static final java.lang.String JAR_EXE_NAME
protected static final OS theOS
protected static final boolean bIsWindows
protected static final java.lang.String COMPILER
protected static final java.lang.String EXECUTABLE
protected static final java.lang.String JRE
protected static final java.lang.String JDK
protected static final java.lang.String MAKER
protected static final java.lang.String VERSION
protected static final ToVersion TO_VERSION
protected static final ToFile TO_FILE
protected static final ToJre TO_JRE
protected static final ToJdk TO_JDK
protected static final java.util.logging.Logger logger
protected Jdk theJdk
| Constructor Detail |
|---|
public JavaToolExecutor()
| Method Detail |
|---|
protected abstract java.lang.String getExeName()
protected abstract T getTool()
public abstract java.lang.String getName()
getName in interface Namedpublic void setJdk(Jdk jdk)
jdk - the owning JDK.public Jdk getJdk()
public Version getVersion()
getVersion in interface Versionedpublic java.lang.String getMaker()
public static <T extends JavaToolExecutor> JavaToolExecutor<T> fromMap(JavaToolExecutor<T> exec,
java.util.Map<java.lang.String,java.lang.Object> map)
public ProcessExecutor.Result execute(java.util.List<java.lang.Object> args,
TerpEvaluator eval,
TerpContext ctx)
Executor
execute in interface Executor<ProcessExecutor.Result>execute in class BatchExecutorargs - the arguments.eval - the evaluator to use. Can frequently be null.ctx - the context in which the execution occurs. Can frequently be null.
public ProcessExecutor.Result batchExecute(java.util.List<java.lang.Object> args)
|
terp - the Codemesh Modular Template Interpreter v1.3.304 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||