terp - the Codemesh Modular
Template Interpreter v1.3.337

com.codemesh.terp.data
Class Jdk.Impl

java.lang.Object
  extended by com.codemesh.terp.data.Jdk.Impl
All Implemented Interfaces:
Named, Jdk, Versioned, java.io.Serializable, java.lang.Comparable<Jdk>
Enclosing interface:
Jdk

public static class Jdk.Impl
extends java.lang.Object
implements Jdk

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.codemesh.terp.data.Jdk
Jdk.Impl
 
Field Summary
protected static java.util.Set<Jdk> ALL_JDKS
           
protected static boolean bIsMacOS
           
protected static boolean bIsWindows
           
protected static java.lang.String JAR_EXE_NAME
           
protected static java.lang.String JAVAC_EXE_NAME
           
protected static java.lang.String JAVADOC_EXE_NAME
           
protected  java.io.File theHomeDir
           
protected  JarExecutor theJar
           
protected  JavacExecutor theJavac
           
protected  JavadocExecutor theJavadoc
           
protected  Jre theJre
           
protected static OS theOS
           
protected  java.io.File theSources
           
protected  Path theToolsPath
           
protected static ToFile TO_FILE
           
protected static ToString TO_STRING
           
protected static ToVersion TO_VERSION
           
 
Fields inherited from interface com.codemesh.terp.data.Jdk
DIR, HOME_DIR, MAKER, VERSION
 
Constructor Summary
protected Jdk.Impl()
           
 
Method Summary
 int compareTo(Jdk o)
          
 boolean equals(java.lang.Object o)
          
static Jdk fromMap(java.util.Map<java.lang.String,java.lang.Object> map)
           
static java.util.Set<Jdk> getAll()
           
 java.io.File getDir()
          Returns the JDK's home directory.
 java.io.File getHomeDir()
          Returns the JDK's home directory.
 JarExecutor getJar()
          Returns the jar executor.
 JavaExecutor getJava()
          Returns the java executor.
 JavacExecutor getJavac()
          Returns the javac executor.
 JavadocExecutor getJavadoc()
          Returns the javadoc executor.
 Jre getJre()
          Returns the JDK's Java Runtime Environment.
 java.lang.String getMaker()
          Returns a code for the maker of the JRE.
 java.lang.String getName()
          Returns the named object's name.
 java.io.File getSources()
          Returns a file (or directory) containing source files for the JDK.
 Path getToolsClassPath()
          Returns a path containing JDK-specific classpath roots.
 Version getVersion()
          Returns the JDK's version.
 int hashCode()
          
static void populate()
           
 void setMaker(java.lang.String maker)
          Sets the JRE's maker code.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theHomeDir

protected java.io.File theHomeDir

theSources

protected java.io.File theSources

theJre

protected Jre theJre

theJavac

protected JavacExecutor theJavac

theJavadoc

protected JavadocExecutor theJavadoc

theJar

protected JarExecutor theJar

theToolsPath

protected Path theToolsPath

TO_FILE

protected static final ToFile TO_FILE

TO_STRING

protected static final ToString TO_STRING

TO_VERSION

protected static final ToVersion TO_VERSION

JAVAC_EXE_NAME

protected static final java.lang.String JAVAC_EXE_NAME

JAVADOC_EXE_NAME

protected static final java.lang.String JAVADOC_EXE_NAME

JAR_EXE_NAME

protected static final java.lang.String JAR_EXE_NAME

ALL_JDKS

protected static final java.util.Set<Jdk> ALL_JDKS

theOS

protected static final OS theOS

bIsWindows

protected static final boolean bIsWindows

bIsMacOS

protected static final boolean bIsMacOS
Constructor Detail

Jdk.Impl

protected Jdk.Impl()
Method Detail

getAll

public static java.util.Set<Jdk> getAll()

fromMap

public static Jdk fromMap(java.util.Map<java.lang.String,java.lang.Object> map)

populate

public static void populate()

compareTo

public int compareTo(Jdk o)

Specified by:
compareTo in interface java.lang.Comparable<Jdk>

equals

public boolean equals(java.lang.Object o)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

getDir

public java.io.File getDir()
Returns the JDK's home directory. This is an alias for Jdk.getHomeDir().

Specified by:
getDir in interface Jdk
Returns:
the home directory.

getHomeDir

public java.io.File getHomeDir()
Returns the JDK's home directory. This is an alias for Jdk.getDir().

Specified by:
getHomeDir in interface Jdk
Returns:
the home directory.

getSources

public java.io.File getSources()
Returns a file (or directory) containing source files for the JDK. This method may return null if sources cannot be located.

Specified by:
getSources in interface Jdk
Returns:
a file (or directory) containing sources.

getToolsClassPath

public Path getToolsClassPath()
Returns a path containing JDK-specific classpath roots. A JDK always comes with a set of jar files that contain the classes that comprise the Java development tools like javac or javadoc. This method returns the classpath including all these jar files. It does not include the JRE's system classpath.

Please note that on MacOS X all the tools are included in the JRE's classpath, so the returned path is empty.

Specified by:
getToolsClassPath in interface Jdk
Returns:
a path comprising of the development tool jar files.
See Also:
Jre.getSystemClassPath()

getJava

public JavaExecutor getJava()
Returns the java executor.

Specified by:
getJava in interface Jdk
Returns:
an executor for the Java runtime associated with this JDK instance.

getJavac

public JavacExecutor getJavac()
Returns the javac executor.

Specified by:
getJavac in interface Jdk
Returns:
an executor for the Java compiler associated with this JDK instance.

getJavadoc

public JavadocExecutor getJavadoc()
Returns the javadoc executor.

Specified by:
getJavadoc in interface Jdk
Returns:
an executor for the Javadoc compiler associated with this JDK instance.

getJar

public JarExecutor getJar()
Returns the jar executor.

Specified by:
getJar in interface Jdk
Returns:
an executor for the jar tool associated with this JDK instance.

getJre

public Jre getJre()
Returns the JDK's Java Runtime Environment.

Specified by:
getJre in interface Jdk
Returns:
a JRE belonging to this JDK.

getName

public java.lang.String getName()
Returns the named object's name.

Specified by:
getName in interface Named
Returns:
the name.

getVersion

public Version getVersion()
Returns the JDK's version.

Specified by:
getVersion in interface Jdk
Specified by:
getVersion in interface Versioned
Returns:
the JDK's version.

setMaker

public void setMaker(java.lang.String maker)
Sets the JRE's maker code.

Specified by:
setMaker in interface Jdk
Parameters:
maker - the maker code.
See Also:
for a list of supported codes.

getMaker

public java.lang.String getMaker()
Returns a code for the maker of the JRE. Currently supported maker codes include: sun, ibm, oracle, and bea.

Specified by:
getMaker in interface Jdk
Returns:
the maker code.

terp - the Codemesh Modular
Template Interpreter v1.3.337

Copyright © 2008-2016 by Codemesh, Inc. All Rights Reserved.