public class JavaExecHandleBuilder extends AbstractExecHandleBuilder implements JavaExecSpec
| Constructor and Description |
|---|
JavaExecHandleBuilder(FileResolver fileResolver) |
| Modifier and Type | Method and Description |
|---|---|
JavaExecSpec |
args(Iterable<?> args)
Adds args for the main class to be executed.
|
JavaExecHandleBuilder |
args(Object... args)
Adds args for the main class to be executed.
|
JavaForkOptions |
bootstrapClasspath(Object... classpath)
Adds the given values to the end of the bootstrap classpath for the process.
|
ExecHandle |
build() |
JavaExecHandleBuilder |
classpath(Object... paths)
Adds elements to the classpath for executing the main class.
|
JavaForkOptions |
copyTo(JavaForkOptions options)
Copies these options to the given options.
|
List<String> |
getAllArguments() |
List<String> |
getAllJvmArgs()
Returns the full set of arguments to use to launch the JVM for the process.
|
List<String> |
getArgs()
Returns the arguments passed to the main class to be executed.
|
FileCollection |
getBootstrapClasspath()
Returns the bootstrap classpath to use for the process.
|
FileCollection |
getClasspath()
Returns the classpath for executing the main class.
|
boolean |
getDebug()
Returns true if debugging is enabled for the process.
|
String |
getDefaultCharacterEncoding()
Returns the default character encoding to use.
|
boolean |
getEnableAssertions()
Returns true if assertions are enabled for the process.
|
List<String> |
getJvmArgs()
Returns the extra arguments to use to launch the JVM for the process.
|
String |
getMain()
Returns the fully qualified name of the Main class to be executed.
|
String |
getMaxHeapSize()
Returns the maximum heap size for the process, if any.
|
String |
getMinHeapSize()
Returns the minimum heap size for the process, if any.
|
Map<String,Object> |
getSystemProperties()
Returns the system properties which will be used for the process.
|
JavaExecHandleBuilder |
jvmArgs(Iterable<?> arguments)
Adds some arguments to use to launch the JVM for the process.
|
JavaExecHandleBuilder |
jvmArgs(Object... arguments)
Adds some arguments to use to launch the JVM for the process.
|
void |
setAllJvmArgs(Iterable<?> arguments)
Sets the full set of arguments to use to launch the JVM for the process.
|
JavaExecHandleBuilder |
setArgs(Iterable<?> applicationArgs)
Sets the args for the main class to be executed.
|
void |
setBootstrapClasspath(FileCollection classpath)
Sets the bootstrap classpath to use for the process.
|
JavaExecHandleBuilder |
setClasspath(FileCollection classpath)
Sets the classpath for executing the main class.
|
void |
setDebug(boolean enabled)
Enable or disable debugging for the process.
|
void |
setDefaultCharacterEncoding(String defaultCharacterEncoding)
Sets the default character encoding to use.
|
void |
setEnableAssertions(boolean enabled)
Enable or disable assertions for the process.
|
JavaExecSpec |
setIgnoreExitValue(boolean ignoreExitValue)
Sets whether a non-zero exit value is ignored, or an exception thrown.
|
void |
setJvmArgs(Iterable<?> arguments)
Sets the extra arguments to use to launch the JVM for the process.
|
JavaExecHandleBuilder |
setMain(String mainClassName)
Sets the fully qualified name of the main class to be executed.
|
void |
setMaxHeapSize(String heapSize)
Sets the maximum heap size for the process.
|
void |
setMinHeapSize(String heapSize)
Sets the minimum heap size for the process.
|
void |
setSystemProperties(Map<String,?> properties)
Sets the system properties to use for the process.
|
JavaExecHandleBuilder |
systemProperties(Map<String,?> properties)
Adds some system properties to use for the process.
|
JavaExecHandleBuilder |
systemProperty(String name,
Object value)
Adds a system property to use for the process.
|
getCommandLine, getDisplayName, getErrorOutput, getStandardInput, getStandardOutput, isIgnoreExitValue, listener, setDisplayName, setErrorOutput, setStandardInput, setStandardOutputcopyTo, environment, environment, executable, getActualEnvironment, getEnvironment, getExecutable, getResolver, getWorkingDir, setEnvironment, setExecutable, setWorkingDir, workingDirclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCommandLine, getErrorOutput, getStandardInput, getStandardOutput, isIgnoreExitValue, setErrorOutput, setStandardInput, setStandardOutputcopyTo, environment, environment, executable, getEnvironment, getExecutable, getWorkingDir, setEnvironment, setExecutable, setWorkingDir, workingDirpublic JavaExecHandleBuilder(FileResolver fileResolver)
public List<String> getAllJvmArgs()
JavaForkOptionsgetAllJvmArgs in interface JavaForkOptionspublic void setAllJvmArgs(Iterable<?> arguments)
JavaForkOptionssetAllJvmArgs in interface JavaForkOptionsarguments - The arguments. Must not be null.public List<String> getJvmArgs()
JavaForkOptionsgetJvmArgs in interface JavaForkOptionspublic void setJvmArgs(Iterable<?> arguments)
JavaForkOptionssetJvmArgs in interface JavaForkOptionsarguments - The arguments. Must not be null.public JavaExecHandleBuilder jvmArgs(Iterable<?> arguments)
JavaForkOptionsjvmArgs in interface JavaForkOptionsarguments - The arguments. Must not be null.public JavaExecHandleBuilder jvmArgs(Object... arguments)
JavaForkOptionsjvmArgs in interface JavaForkOptionsarguments - The arguments.public Map<String,Object> getSystemProperties()
JavaForkOptionsgetSystemProperties in interface JavaForkOptionspublic void setSystemProperties(Map<String,?> properties)
JavaForkOptionssetSystemProperties in interface JavaForkOptionsproperties - The system properties. Must not be null.public JavaExecHandleBuilder systemProperties(Map<String,?> properties)
JavaForkOptionssystemProperties in interface JavaForkOptionsproperties - The system properties. Must not be null.public JavaExecHandleBuilder systemProperty(String name, Object value)
JavaForkOptionssystemProperty in interface JavaForkOptionsname - The name of the propertyvalue - The value for the property. May be null.public FileCollection getBootstrapClasspath()
JavaForkOptionsgetBootstrapClasspath in interface JavaForkOptionspublic void setBootstrapClasspath(FileCollection classpath)
JavaForkOptionssetBootstrapClasspath in interface JavaForkOptionsclasspath - The classpath. Must not be null. Can be empty.public JavaForkOptions bootstrapClasspath(Object... classpath)
JavaForkOptionsbootstrapClasspath in interface JavaForkOptionsclasspath - The classpath.public String getMinHeapSize()
JavaForkOptionsgetMinHeapSize in interface JavaForkOptionspublic void setMinHeapSize(String heapSize)
JavaForkOptionssetMinHeapSize in interface JavaForkOptionsheapSize - The minimum heap size. Use null for the default minimum heap size.public String getDefaultCharacterEncoding()
JavaForkOptionsgetDefaultCharacterEncoding in interface JavaForkOptionsdefault character encoding of this JVM should be used.public void setDefaultCharacterEncoding(String defaultCharacterEncoding)
JavaForkOptionsfile.encoding property). For JVMs
where this is the case, setting the file.encoding property via JavaForkOptions.setSystemProperties(java.util.Map) or similar will have no effect as
this value will be overridden by the value specified by JavaForkOptions.getDefaultCharacterEncoding().setDefaultCharacterEncoding in interface JavaForkOptionsdefaultCharacterEncoding - The default character encoding. Use null to use this JVM's default charsetpublic String getMaxHeapSize()
JavaForkOptionsgetMaxHeapSize in interface JavaForkOptionspublic void setMaxHeapSize(String heapSize)
JavaForkOptionssetMaxHeapSize in interface JavaForkOptionsheapSize - The heap size. Use null for the default maximum heap size.public boolean getEnableAssertions()
JavaForkOptionsgetEnableAssertions in interface JavaForkOptionspublic void setEnableAssertions(boolean enabled)
JavaForkOptionssetEnableAssertions in interface JavaForkOptionsenabled - true to enable assertions, false to disable.public boolean getDebug()
JavaForkOptionsgetDebug in interface JavaForkOptionspublic void setDebug(boolean enabled)
JavaForkOptionssetDebug in interface JavaForkOptionsenabled - true to enable debugging, false to disable.public String getMain()
JavaExecSpecgetMain in interface JavaExecSpecpublic JavaExecHandleBuilder setMain(String mainClassName)
JavaExecSpecsetMain in interface JavaExecSpecmainClassName - the fully qualified name of the main class to be executed.public List<String> getArgs()
JavaExecSpecgetArgs in interface JavaExecSpecpublic JavaExecHandleBuilder setArgs(Iterable<?> applicationArgs)
JavaExecSpecsetArgs in interface JavaExecSpecapplicationArgs - Args for the main class.public JavaExecHandleBuilder args(Object... args)
JavaExecSpecargs in interface JavaExecSpecargs - Args for the main class.public JavaExecSpec args(Iterable<?> args)
JavaExecSpecargs in interface JavaExecSpecargs - Args for the main class.public JavaExecHandleBuilder setClasspath(FileCollection classpath)
JavaExecSpecsetClasspath in interface JavaExecSpecclasspath - the classpathpublic JavaExecHandleBuilder classpath(Object... paths)
JavaExecSpecclasspath in interface JavaExecSpecpaths - classpath elementspublic FileCollection getClasspath()
JavaExecSpecgetClasspath in interface JavaExecSpecpublic List<String> getAllArguments()
getAllArguments in class AbstractExecHandleBuilderpublic JavaForkOptions copyTo(JavaForkOptions options)
JavaForkOptionscopyTo in interface JavaForkOptionsoptions - The target options.public ExecHandle build()
build in class AbstractExecHandleBuilderpublic JavaExecSpec setIgnoreExitValue(boolean ignoreExitValue)
BaseExecSpecsetIgnoreExitValue in interface BaseExecSpecsetIgnoreExitValue in class AbstractExecHandleBuilderignoreExitValue - whether a non-zero exit value is ignored, or an exception thrownCopyright © 2013. All rights reserved