terp - the Codemesh Modular
Template Interpreter v1.3.309

com.codemesh.terp.data
Interface Jdk

All Superinterfaces:
java.lang.Comparable<Jdk>, Named, java.io.Serializable, Versioned
All Known Implementing Classes:
Jdk.Impl

public interface Jdk
extends java.lang.Comparable<Jdk>, java.io.Serializable, Named, Versioned

The interface implemented by all JDK instances.


Nested Class Summary
static class Jdk.Impl
           
 
Field Summary
static java.lang.String DIR
           
static java.lang.String HOME_DIR
           
static java.lang.String MAKER
           
static java.lang.String VERSION
           
 
Method Summary
 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.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.
 void setMaker(java.lang.String maker)
          Sets the JRE's maker code.
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.codemesh.terp.api.Named
getName
 

Field Detail

DIR

static final java.lang.String DIR
See Also:
Constant Field Values

HOME_DIR

static final java.lang.String HOME_DIR
See Also:
Constant Field Values

MAKER

static final java.lang.String MAKER
See Also:
Constant Field Values

VERSION

static final java.lang.String VERSION
See Also:
Constant Field Values
Method Detail

getDir

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

Returns:
the home directory.

getHomeDir

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

Returns:
the home directory.

getSources

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.

Returns:
a file (or directory) containing sources.

getToolsClassPath

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.

Returns:
a path comprising of the development tool jar files.
See Also:
Jre.getSystemClassPath()

getVersion

Version getVersion()
Returns the JDK's version.

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

getJre

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

Returns:
a JRE belonging to this JDK.

getJava

JavaExecutor getJava()
Returns the java executor.

Returns:
an executor for the Java runtime associated with this JDK instance.

getJavac

JavacExecutor getJavac()
Returns the javac executor.

Returns:
an executor for the Java compiler associated with this JDK instance.

getJavadoc

JavadocExecutor getJavadoc()
Returns the javadoc executor.

Returns:
an executor for the Javadoc compiler associated with this JDK instance.

getJar

JarExecutor getJar()
Returns the jar executor.

Returns:
an executor for the jar tool associated with this JDK instance.

setMaker

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

Parameters:
maker - the maker code.
See Also:
for a list of supported codes.

getMaker

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

Returns:
the maker code.

terp - the Codemesh Modular
Template Interpreter v1.3.309

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