|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.rice.cs.drjava.model.compiler.CompilerProxy
A compiler interface to search a given
Field Summary | |
private String |
_className
|
private ClassLoader |
_newLoader
|
private CompilerInterface |
_realCompiler
The actual compiler interface. |
private static String[] |
_useOldLoader
These classes will always be loaded using the previous classloader. |
Constructor Summary | |
CompilerProxy(String className,
ClassLoader newLoader)
A proxy compiler interface that tries to load the given class from one of the given locations. |
Method Summary | |
private void |
_recreateCompiler()
|
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 |
|
Field Detail |
private CompilerInterface _realCompiler
private final String _className
private final ClassLoader _newLoader
private static final String[] _useOldLoader
Constructor Detail |
public CompilerProxy(String className, ClassLoader newLoader)
className
- Implementation of CompilerInterface
to proxy for.loader
- Classloader to useMethod Detail |
private void _recreateCompiler()
public CompilerError[] compile(File sourceRoot, File[] files)
compile
in interface CompilerInterface
files
- Source files to compile.sourceRoot
- Source root directory, the base of the package structure.public CompilerError[] compile(File[] sourceRoots, File[] files)
compile
in interface CompilerInterface
files
- Source files to compile.sourceRoots
- Array of source root directories, the base of
the package structure for all files to compile.public boolean isAvailable()
compile(java.io.File, java.io.File[])
method
should not fail due to class not being found.isAvailable
in interface CompilerInterface
public String getName()
getName
in interface CompilerInterface
public String toString()
toString
in interface CompilerInterface
toString
in class Object
public void setExtraClassPath(String extraClassPath)
setExtraClassPath
in interface CompilerInterface
public void setAllowAssertions(boolean allow)
setAllowAssertions
in interface CompilerInterface
public void addToBootClassPath(File cp)
addToBootClassPath
in interface CompilerInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |