Package org.apache.calcite.util.javac
Class JavaCompilerArgs
java.lang.Object
org.apache.calcite.util.javac.JavaCompilerArgs
- Direct Known Subclasses:
JaninoCompiler.JaninoCompilerArgs
A
JavaCompilerArgs
holds the arguments for a
JavaCompiler
.
Specific implementations of JavaCompiler
may override
setArgument
methods to store arguments in a different fashion,
or may throw UnsupportedOperationException
to indicate that the
compiler does not support that argument.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
clear()
String[]
String[]
void
setClassLoader
(ClassLoader classLoader) void
setClasspath
(String classpath) void
setDebugInfo
(int i) void
setDestdir
(String destdir) void
setFullClassName
(String fullClassName) void
Sets the source code (that is, the full java program, generally starting with something like "package com.foo.bar;") and the file name.void
Sets the arguments by parsing a standard java argument string.void
setStringArray
(String[] args) Sets the arguments by parsing a standard java argument string.void
setVerbose
(boolean verbose) boolean
Returns whethersetSource(java.lang.String, java.lang.String)
will work.
-
Constructor Details
-
JavaCompilerArgs
public JavaCompilerArgs()
-
-
Method Details
-
clear
public void clear() -
setString
Sets the arguments by parsing a standard java argument string.A typical such string is
"-classpath classpath -d dir -verbose [file...]"
-
setStringArray
Sets the arguments by parsing a standard java argument string. A typical such string is"-classpath classpath -d dir -verbose [file...]"
-
getStringArray
-
addFile
-
getFileNames
-
setVerbose
public void setVerbose(boolean verbose) -
setDestdir
-
setClasspath
-
setDebugInfo
public void setDebugInfo(int i) -
setSource
Sets the source code (that is, the full java program, generally starting with something like "package com.foo.bar;") and the file name.This method is optional. It only works if the compiler supports in-memory compilation. If this compiler does not return in-memory compilation (which the base class does not),
supportsSetSource()
returns false, and this method throwsUnsupportedOperationException
. -
supportsSetSource
public boolean supportsSetSource()Returns whethersetSource(java.lang.String, java.lang.String)
will work. -
setFullClassName
-
setClassLoader
-
getClassLoader
-