Runtime.exec(String[])
- * @return the description string
+ * Return a String that describes the command and arguments suitable for
+ * verbose output before a call to Runtime.exec(String[]).
+ * @return the description string.
* @since Ant 1.5
*/
public String describeCommand() {
@@ -479,11 +475,11 @@ public class CommandlineJava implements Cloneable {
}
/**
- * Returns a String that describes the java command and arguments
- * for in VM executions.
+ * Return a String that describes the java command and arguments
+ * for in-VM executions.
*
* The class name is the executable in this context.
- * @return the description string
+ * @return the description string.
* @since Ant 1.5
*/
public String describeJavaCommand() {
@@ -491,8 +487,8 @@ public class CommandlineJava implements Cloneable {
}
/**
- * Get the VM command parameters, including memory settings
- * @return the VM command parameters
+ * Get the VM command parameters, including memory settings.
+ * @return the VM command parameters.
*/
protected Commandline getActualVMCommand() {
Commandline actualVMCommand = (Commandline) vmCommand.clone();
@@ -507,11 +503,11 @@ public class CommandlineJava implements Cloneable {
}
/**
- * The size of the java command line. This is a fairly intensive
+ * Get the size of the java command line. This is a fairly intensive
* operation, as it has to evaluate the size of many components.
* @return the total number of arguments in the java command line.
* @see #getCommandline()
- * @deprecated please dont use this -it effectively creates the entire command.
+ * @deprecated please dont use this--it effectively creates the entire command.
*/
public int size() {
int size = getActualVMCommand().size() + javaCommand.size()
@@ -520,7 +516,6 @@ public class CommandlineJava implements Cloneable {
if (isCloneVm()) {
size += System.getProperties().size();
}
-
// classpath is "-classpath " -> 2 args
if (haveClasspath()) {
size += 2;
@@ -541,8 +536,8 @@ public class CommandlineJava implements Cloneable {
}
/**
- * get the Java command to be used.
- * @return the java command -not a clone.
+ * Get the Java command to be used.
+ * @return the java command--not a clone.
*/
public Commandline getJavaCommand() {
return javaCommand;
@@ -550,38 +545,39 @@ public class CommandlineJava implements Cloneable {
/**
* Get the VM command, including memory.
- * @return A deep clone of the instance's VM command, with memory settings added
+ * @return A deep clone of the instance's VM command, with memory settings added.
*/
public Commandline getVmCommand() {
return getActualVMCommand();
}
/**
- * get the classpath for the command
- * @return the classpath or null
+ * Get the classpath for the command.
+ * @return the classpath or null.
*/
public Path getClasspath() {
return classpath;
}
/**
- * get the boot classpath
- * @return boot classpath or null
+ * Get the boot classpath.
+ * @return boot classpath or null.
*/
public Path getBootclasspath() {
return bootclasspath;
}
/**
- * cache current system properties and set them to those in this
- * java command
- * @throws BuildException if Security prevented this operation
+ * Cache current system properties and set them to those in this
+ * Java command.
+ * @throws BuildException if Security prevented this operation.
*/
public void setSystemProperties() throws BuildException {
sysProperties.setSystem();
}
/**
+ * Restore the cached system properties.
* @throws BuildException if Security prevented this operation, or
* there was no system properties to restore
*/
@@ -590,18 +586,18 @@ public class CommandlineJava implements Cloneable {
}
/**
- * get the system properties object
- * @return The system properties object
+ * Get the system properties object.
+ * @return The system properties object.
*/
public SysProperties getSystemProperties() {
return sysProperties;
}
/**
- * clone the object; clone of all fields in the class
- * @return a CommandlineJava object
+ * Deep clone the object.
+ * @return a CommandlineJava object.
* @throws BuildException if anything went wrong.
- * @throws CloneNotSupportedException never
+ * @throws CloneNotSupportedException never.
*/
public Object clone() throws CloneNotSupportedException {
try {
@@ -632,9 +628,9 @@ public class CommandlineJava implements Cloneable {
}
/**
- * Has the classpath been specified and shall it really be used or
- * will build.sysclasspath null it?
- * @return true if the classpath is to be used
+ * Determine whether the classpath has been specified, and whether it shall
+ * really be used or be nulled by build.sysclasspath.
+ * @return true if the classpath is to be used.
* @since Ant 1.6
*/
protected boolean haveClasspath() {
@@ -645,13 +641,13 @@ public class CommandlineJava implements Cloneable {
}
/**
- * Has the bootclasspath been specified and shall it really be
- * used (build.sysclasspath could be set or the VM may not support
- * it)?
+ * Determine whether the bootclasspath has been specified, and whether it
+ * shall really be used (build.sysclasspath could be set or the VM may not
+ * support it).
*
* @param log whether to log a warning if a bootclasspath has been
* specified but will be ignored.
- * @return true if the bootclasspath is to be used
+ * @return true if the bootclasspath is to be used.
* @since Ant 1.6
*/
protected boolean haveBootclasspath(boolean log) {
@@ -662,7 +658,7 @@ public class CommandlineJava implements Cloneable {
* Calculate the bootclasspath based on the bootclasspath
* specified, the build.sysclasspath and ant.build.clonevm magic
* properties as well as the cloneVm attribute.
- *
+ * @param log whether to write messages to the log.
* @since Ant 1.7
*/
private Path calculateBootclasspath(boolean log) {
@@ -684,9 +680,9 @@ public class CommandlineJava implements Cloneable {
}
/**
- * Has the cloneVm attribute or the magic property
- * ant.build.clonevm been set?
- *
+ * Find out whether either of the cloneVm attribute or the magic property
+ * ant.build.clonevm has been set.
+ * @return boolean
.
* @since 1.7
*/
private boolean isCloneVm() {