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

java.lang.Object
  |
  +--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,v 1.9 2002/09/02 21:24:11 csreis Exp $

Field Summary
private static String MESSAGE
           
static CompilerInterface ONLY
           
 
Constructor Summary
private NoCompilerAvailable()
           
 
Method Summary
 void addToBootClassPath(File cp)
          This method allows us to set the JSR14 collections path across a class loader.
 CompilerError[] compile(File[] sourceRoots, File[] files)
          Compile the given files.
 CompilerError[] compile(File sourceRoot, File[] files)
          Compile the given files.
 String getName()
          Returns the name of this compiler, appropriate to show to the user.
 boolean isAvailable()
          Indicates whether this compiler is actually available.
 void setAllowAssertions(boolean allow)
          Sets whether to allow assertions in Java 1.4.
 void setExtraClassPath(String extraClassPath)
          Allows us to set the extra classpath for the compilers without referencing the config object in a loaded class file
 String toString()
          Should return info about compiler, at least including name.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

ONLY

public static final CompilerInterface ONLY

MESSAGE

private static final String MESSAGE
Constructor Detail

NoCompilerAvailable

private NoCompilerAvailable()
Method Detail

compile

public CompilerError[] compile(File sourceRoot,
                               File[] files)
Description copied from interface: CompilerInterface
Compile the given files.
Specified by:
compile in interface CompilerInterface
Following copied from interface: edu.rice.cs.drjava.model.compiler.CompilerInterface
Parameters:
files - Source files to compile.
sourceRoot - Source root directory, the base of the package structure.
Returns:
Array of errors that occurred. If no errors, should be zero length array (not null).

compile

public CompilerError[] compile(File[] sourceRoots,
                               File[] files)
Description copied from interface: CompilerInterface
Compile the given files.
Specified by:
compile in interface CompilerInterface
Following copied from interface: edu.rice.cs.drjava.model.compiler.CompilerInterface
Parameters:
files - Source files to compile.
sourceRoots - Array of source root directories, the base of the package structure for all files to compile.
Returns:
Array of errors that occurred. If no errors, should be zero length array (not null).

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.io.File, java.io.File[]) method should not fail due to class not being found.
Specified by:
isAvailable 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

toString

public String toString()
Description copied from interface: CompilerInterface
Should return info about compiler, at least including name.
Specified by:
toString in interface CompilerInterface
Overrides:
toString in class Object

setExtraClassPath

public void setExtraClassPath(String extraClassPath)
Allows us to set the extra classpath for the compilers without referencing the config object in a loaded class file
Specified by:
setExtraClassPath in interface CompilerInterface

setAllowAssertions

public void setAllowAssertions(boolean allow)
Sets whether to allow assertions in Java 1.4.
Specified by:
setAllowAssertions in interface CompilerInterface

addToBootClassPath

public void addToBootClassPath(File cp)
This method allows us to set the JSR14 collections path across a class loader. (cannot cast a loaded class to a subclass, so all compiler interfaces must have this method)
Specified by:
addToBootClassPath in interface CompilerInterface