You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ja...@apache.org on 2018/07/05 07:01:14 UTC
ant git commit: Add javadoc to CommandLineJava for source-file
execution APIs
Repository: ant
Updated Branches:
refs/heads/master bbec119eb -> 4ce54bf3b
Add javadoc to CommandLineJava for source-file execution APIs
Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/4ce54bf3
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/4ce54bf3
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/4ce54bf3
Branch: refs/heads/master
Commit: 4ce54bf3b6c521af9c8db3229df5cd8b3199a3b2
Parents: bbec119
Author: Jaikiran Pai <ja...@apache.org>
Authored: Thu Jul 5 12:30:07 2018 +0530
Committer: Jaikiran Pai <ja...@apache.org>
Committed: Thu Jul 5 12:30:26 2018 +0530
----------------------------------------------------------------------
.../org/apache/tools/ant/types/CommandlineJava.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/4ce54bf3/src/main/org/apache/tools/ant/types/CommandlineJava.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/CommandlineJava.java b/src/main/org/apache/tools/ant/types/CommandlineJava.java
index 1ee821a..8ddebc9 100644
--- a/src/main/org/apache/tools/ant/types/CommandlineJava.java
+++ b/src/main/org/apache/tools/ant/types/CommandlineJava.java
@@ -368,11 +368,24 @@ public class CommandlineJava implements Cloneable {
return null;
}
+ /**
+ * Set the source-file, to execute as single file source programs, a feature, available
+ * since Java 11.
+ *
+ * @param sourceFile The path to the source file
+ * @since Ant 1.10.5
+ */
public void setSourceFile(final String sourceFile) {
this.executableType = ExecutableType.SOURCE_FILE;
javaCommand.setExecutable(sourceFile);
}
+ /**
+ * @return Returns the source-file to execute, if this command line has
+ * been {@link #setSourceFile(String) configured for single file source program
+ * execution}. Else returns null.
+ * @since Ant 1.10.5
+ */
public String getSourceFile() {
return this.executableType == ExecutableType.SOURCE_FILE ? this.javaCommand.getExecutable() : null;
}