edu.rice.cs.drjava.model.compiler
Class NoCompilerAvailable

java.lang.Object
  extended by edu.rice.cs.drjava.model.compiler.NoCompilerAvailable
All Implemented Interfaces:
CompilerInterface

public class NoCompilerAvailable
extends Object
implements CompilerInterface

A CompilerInterface implementation for signifying that no compiler is available.

Version:
$Id: NoCompilerAvailable.java 4691 2008-12-02 23:33:27Z dlsmith $

Field Summary
static CompilerInterface ONLY
           
 
Method Summary
 List<? extends DJError> compile(List<? extends File> files, List<? extends File> classPath, List<? extends File> sourcePath, File destination, List<? extends File> bootClassPath, String sourceVersion, boolean showWarnings)
          Compile the given files.
 String getDescription()
          Returns a one-line description of the compiler (such as the name and file location)
 String getName()
          Returns the name of this compiler, appropriate to show to the user.
 boolean isAvailable()
          Indicates whether this compiler is actually available.
 String toString()
          The toString() of this class is displayed in the "Compiler" drop down on the compiler tab.
 JavaVersion version()
          The latest version of Java supported by the compiler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ONLY

public static final CompilerInterface ONLY
Method Detail

isAvailable

public boolean isAvailable()
Description copied from interface: CompilerInterface
Indicates whether this compiler is actually available. As in: Is it installed and located? This method should load the compiler class, which should hopefully prove whether the class can load. If this method returns true, the CompilerInterface.compile(java.util.List, java.util.List, java.util.List, java.io.File, java.util.List, java.lang.String, boolean) method should not fail due to class not being found.

Specified by:
isAvailable in interface CompilerInterface

compile

public List<? extends DJError> compile(List<? extends File> files,
                                       List<? extends File> classPath,
                                       List<? extends File> sourcePath,
                                       File destination,
                                       List<? extends File> bootClassPath,
                                       String sourceVersion,
                                       boolean showWarnings)
Description copied from interface: CompilerInterface
Compile the given files.

Specified by:
compile in interface CompilerInterface
Parameters:
files - Source files to compile.
classPath - Support jars or directories that should be on the classpath. If @code{null}, the default is used.
sourcePath - Location of additional sources to be compiled on-demand. If @code{null}, the default is used.
destination - Location (directory) for compiled classes. If @code{null}, the default in-place location is used.
bootClassPath - The bootclasspath (contains Java API jars or directories); should be consistent with @code{sourceVersion} If @code{null}, the default is used.
sourceVersion - The language version of the sources. Should be consistent with @code{bootClassPath}. If @code{null}, the default is used.
showWarnings - Whether compiler warnings should be shown or ignored.
Returns:
Errors that occurred. If no errors, should be zero length (not null).

version

public JavaVersion version()
Description copied from interface: CompilerInterface
The latest version of Java supported by the compiler

Specified by:
version in interface CompilerInterface

getName

public String getName()
Description copied from interface: CompilerInterface
Returns the name of this compiler, appropriate to show to the user.

Specified by:
getName in interface CompilerInterface

getDescription

public String getDescription()
Description copied from interface: CompilerInterface
Returns a one-line description of the compiler (such as the name and file location)

Specified by:
getDescription in interface CompilerInterface

toString

public String toString()
The toString() of this class is displayed in the "Compiler" drop down on the compiler tab.

Specified by:
toString in interface CompilerInterface
Overrides:
toString in class Object
Returns:
"None"