edu.rice.cs.drjava.model
Class JDKToolsLibrary

java.lang.Object
  extended by edu.rice.cs.drjava.model.JDKToolsLibrary
Direct Known Subclasses:
JarJDKToolsLibrary

public class JDKToolsLibrary
extends Object

Provides dynamic access to the interface of a JDK's tools.jar classes. This level of indirection eliminates the need to have specific tools.jar classes available statically (and the resulting need to reset the JVM if they are not), and makes it possible to interface with multiple tools.jar libraries simultaneously.


Field Summary
private  CompilerInterface _compiler
           
private  Debugger _debugger
           
private  JavadocModel _javadoc
           
private  JDKDescriptor _jdkDescriptor
           
private  JavaVersion.FullVersion _version
           
protected static PrintWriter LOG_PW
           
static StringWriter LOG_STRINGWRITER
           
 
Constructor Summary
protected JDKToolsLibrary(JavaVersion.FullVersion version, JDKDescriptor jdkDescriptor, CompilerInterface compiler, Debugger debugger, JavadocModel javadoc)
           
 
Method Summary
static String adapterForCompiler(JavaVersion.FullVersion version)
           
static String adapterForDebugger(JavaVersion.FullVersion version)
           
 CompilerInterface compiler()
           
 Debugger debugger()
           
protected static CompilerInterface getCompilerInterface(String className, JavaVersion.FullVersion version)
           
 boolean isValid()
           
 JavadocModel javadoc()
           
 JDKDescriptor jdkDescriptor()
           
static Iterable<JDKToolsLibrary> makeFromRuntime(GlobalModel model)
          Create a JDKToolsLibrary from the runtime class path (or, more accurately, from the class loader that loaded this class.
static void msg(String s)
           
 String toString()
           
 JavaVersion.FullVersion version()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_version

private final JavaVersion.FullVersion _version

_compiler

private final CompilerInterface _compiler

_debugger

private final Debugger _debugger

_javadoc

private final JavadocModel _javadoc

_jdkDescriptor

private final JDKDescriptor _jdkDescriptor

LOG_STRINGWRITER

public static final StringWriter LOG_STRINGWRITER

LOG_PW

protected static final PrintWriter LOG_PW
Constructor Detail

JDKToolsLibrary

protected JDKToolsLibrary(JavaVersion.FullVersion version,
                          JDKDescriptor jdkDescriptor,
                          CompilerInterface compiler,
                          Debugger debugger,
                          JavadocModel javadoc)
Method Detail

version

public JavaVersion.FullVersion version()

jdkDescriptor

public JDKDescriptor jdkDescriptor()

compiler

public CompilerInterface compiler()

debugger

public Debugger debugger()

javadoc

public JavadocModel javadoc()

isValid

public boolean isValid()

toString

public String toString()
Overrides:
toString in class Object

adapterForCompiler

public static String adapterForCompiler(JavaVersion.FullVersion version)

adapterForDebugger

public static String adapterForDebugger(JavaVersion.FullVersion version)

getCompilerInterface

protected static CompilerInterface getCompilerInterface(String className,
                                                        JavaVersion.FullVersion version)

makeFromRuntime

public static Iterable<JDKToolsLibrary> makeFromRuntime(GlobalModel model)
Create a JDKToolsLibrary from the runtime class path (or, more accurately, from the class loader that loaded this class.


msg

public static void msg(String s)