org.eigenbase.javac
Class JavaCompilerArgs

java.lang.Object
  extended by org.eigenbase.javac.JavaCompilerArgs
Direct Known Subclasses:
JaninoCompiler.JaninoCompilerArgs

public class JavaCompilerArgs
extends Object

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.

Since:
Jun 2, 2002
Version:
$Id: //open/dev/farrago/src/org/eigenbase/javac/JavaCompilerArgs.java#12 $
Author:
jhyde

Field Summary
(package private)  List<String> argsList
           
(package private)  ClassLoader classLoader
           
(package private)  List<String> fileNameList
           
 
Constructor Summary
JavaCompilerArgs()
           
 
Method Summary
 void addFile(String fileName)
           
 void clear()
           
 ClassLoader getClassLoader()
           
 String[] getFileNames()
           
 String[] getStringArray()
           
 void setClassLoader(ClassLoader classLoader)
           
 void setClasspath(String classpath)
           
 void setDebugInfo(int i)
           
 void setDestdir(String destdir)
           
 void setFullClassName(String fullClassName)
           
 void setSource(String source, 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(String args)
          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 supportsSetSource()
          Returns whether setSource(java.lang.String, java.lang.String) will work.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

argsList

List<String> argsList

fileNameList

List<String> fileNameList

classLoader

ClassLoader classLoader
Constructor Detail

JavaCompilerArgs

public JavaCompilerArgs()
Method Detail

clear

public void clear()

setString

public void setString(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(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 String[] getStringArray()

addFile

public void addFile(String fileName)

getFileNames

public String[] getFileNames()

setVerbose

public void setVerbose(boolean verbose)

setDestdir

public void setDestdir(String destdir)

setClasspath

public void setClasspath(String classpath)

setDebugInfo

public void setDebugInfo(int i)

setSource

public void setSource(String source,
                      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 throws UnsupportedOperationException.


supportsSetSource

public boolean supportsSetSource()
Returns whether setSource(java.lang.String, java.lang.String) will work.


setFullClassName

public void setFullClassName(String fullClassName)

setClassLoader

public void setClassLoader(ClassLoader classLoader)

getClassLoader

public ClassLoader getClassLoader()