Package org.apache.calcite.util.javac
Class JavaCompilerArgs
- java.lang.Object
-
- org.apache.calcite.util.javac.JavaCompilerArgs
-
- Direct Known Subclasses:
JaninoCompiler.JaninoCompilerArgs
public class JavaCompilerArgs extends java.lang.Object
AJavaCompilerArgs
holds the arguments for aJavaCompiler
.Specific implementations of
JavaCompiler
may overridesetArgument
methods to store arguments in a different fashion, or may throwUnsupportedOperationException
to indicate that the compiler does not support that argument.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<java.lang.String>
argsList
(package private) java.lang.ClassLoader
classLoader
(package private) java.util.List<java.lang.String>
fileNameList
-
Constructor Summary
Constructors Constructor Description JavaCompilerArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFile(java.lang.String fileName)
void
clear()
java.lang.ClassLoader
getClassLoader()
java.lang.String[]
getFileNames()
java.lang.String[]
getStringArray()
void
setClassLoader(java.lang.ClassLoader classLoader)
void
setClasspath(java.lang.String classpath)
void
setDebugInfo(int i)
void
setDestdir(java.lang.String destdir)
void
setFullClassName(java.lang.String fullClassName)
void
setSource(java.lang.String source, java.lang.String fileName)
Sets the source code (that is, the full java program, generally starting with something like "package com.foo.bar;") and the file name.void
setString(java.lang.String args)
Sets the arguments by parsing a standard java argument string.void
setStringArray(java.lang.String[] args)
Sets the arguments by parsing a standard java argument string.void
setVerbose(boolean verbose)
boolean
supportsSetSource()
Returns whethersetSource(java.lang.String, java.lang.String)
will work.
-
-
-
Method Detail
-
clear
public void clear()
-
setString
public void setString(java.lang.String args)
Sets the arguments by parsing a standard java argument string.A typical such string is
"-classpath classpath -d dir -verbose [file...]"
-
setStringArray
public void setStringArray(java.lang.String[] args)
Sets the arguments by parsing a standard java argument string. A typical such string is"-classpath classpath -d dir -verbose [file...]"
-
getStringArray
public java.lang.String[] getStringArray()
-
addFile
public void addFile(java.lang.String fileName)
-
getFileNames
public java.lang.String[] getFileNames()
-
setVerbose
public void setVerbose(boolean verbose)
-
setDestdir
public void setDestdir(java.lang.String destdir)
-
setClasspath
public void setClasspath(java.lang.String classpath)
-
setDebugInfo
public void setDebugInfo(int i)
-
setSource
public void setSource(java.lang.String source, java.lang.String fileName)
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
public void setFullClassName(java.lang.String fullClassName)
-
setClassLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
-
-