org.netbeans.modules.java.platform/1 1.7.22

org.netbeans.api.java.platform
Class JavaPlatform

java.lang.Object
  extended by org.netbeans.api.java.platform.JavaPlatform

public abstract class JavaPlatform
extends Object

JavaPlatform describes a java platform in a way that the IDE tools may utilize. It may serve as description of the platform a java project targets, or it may provide access to tools from the particular SDK installation. It also provides information about individual platforms, for example the Java platform version implemented, vendor name or implementation version. It is also possible to enumerate services that the IDE supports, which are implemented as a part of the Platform.


Field Summary
static String PROP_DISPLAY_NAME
          Property name for displayName
static String PROP_JAVADOC_FOLDER
          Property name for javadocFolders
static String PROP_SOURCE_FOLDER
          Property name for sourceFolders
static String PROP_SYSTEM_PROPERTIES
          Property name for systemProperties
 
Constructor Summary
protected JavaPlatform()
          Creates a new instance of JavaPlatform
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Registers a listener to be notified when some of the platform's properties change
abstract  FileObject findTool(String toolName)
          Gets the platform tool executable.
protected  void firePropertyChange(String propName, Object oldValue, Object newValue)
          Fires PropertyChange to all registered PropertyChangeListeners
abstract  ClassPath getBootstrapLibraries()
          Returns a ClassPath, which represents bootstrap libraries for the runtime environment.
static JavaPlatform getDefault()
          Get the "default platform", meaning the JDK on which NetBeans itself is running.
abstract  String getDisplayName()
           
abstract  Collection getInstallFolders()
          Retrieves a collection of FileObjects of one or more folders where the Platform is installed.
abstract  List getJavadocFolders()
          Returns the locations of the Javadoc for this platform or empty collection if the location is not set or invalid
abstract  Map getProperties()
          Gets the properties defined for java platform.
abstract  ClassPath getSourceFolders()
          Returns the locations of the source of platform or empty collection when the location is not set or is invalid
abstract  Specification getSpecification()
          Returns specification of the Java SDK
abstract  ClassPath getStandardLibraries()
          Returns libraries recognized by default by the platform.
 Map getSystemProperties()
          Gets the java platform system properties.
abstract  String getVendor()
          Returns the vendor of the Java SDK
 void removePropertyChangeListener(PropertyChangeListener l)
          Removes a listener registered previously
protected  void setSystemProperties(Map sysproperties)
          Sets the system properties of java platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_DISPLAY_NAME

public static final String PROP_DISPLAY_NAME
Property name for displayName

See Also:
Constant Field Values

PROP_SOURCE_FOLDER

public static final String PROP_SOURCE_FOLDER
Property name for sourceFolders

See Also:
Constant Field Values

PROP_JAVADOC_FOLDER

public static final String PROP_JAVADOC_FOLDER
Property name for javadocFolders

See Also:
Constant Field Values

PROP_SYSTEM_PROPERTIES

public static final String PROP_SYSTEM_PROPERTIES
Property name for systemProperties

See Also:
Constant Field Values
Constructor Detail

JavaPlatform

protected JavaPlatform()
Creates a new instance of JavaPlatform

Method Detail

getDisplayName

public abstract String getDisplayName()
Returns:
a descriptive, human-readable name of the platform

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyChangeListener l)
Registers a listener to be notified when some of the platform's properties change


removePropertyChangeListener

public final void removePropertyChangeListener(PropertyChangeListener l)
Removes a listener registered previously


getProperties

public abstract Map getProperties()
Gets the properties defined for java platform.

Returns:
the java platform properties

getSystemProperties

public final Map getSystemProperties()
Gets the java platform system properties.

Returns:
the java platform system properties

getBootstrapLibraries

public abstract ClassPath getBootstrapLibraries()
Returns a ClassPath, which represents bootstrap libraries for the runtime environment. The Bootstrap libraries include libraries in JRE's extension directory, if there are any.

Returns:
ClassPath representing the bootstrap libs

getStandardLibraries

public abstract ClassPath getStandardLibraries()
Returns libraries recognized by default by the platform. Usually it corresponds to contents of CLASSPATH environment variable.


getVendor

public abstract String getVendor()
Returns the vendor of the Java SDK

Returns:
String

getSpecification

public abstract Specification getSpecification()
Returns specification of the Java SDK

Returns:
Specification

getInstallFolders

public abstract Collection getInstallFolders()
Retrieves a collection of FileObjects of one or more folders where the Platform is installed. Typically it returns one folder, but in some cases there can be more of them.


findTool

public abstract FileObject findTool(String toolName)
Gets the platform tool executable.

Parameters:
toolName - the tool platform independent tool name.
Returns:
file representing the tool executable, or null if the tool can not be found

getSourceFolders

public abstract ClassPath getSourceFolders()
Returns the locations of the source of platform or empty collection when the location is not set or is invalid

Returns:
ClassPath never returns null

getJavadocFolders

public abstract List getJavadocFolders()
Returns the locations of the Javadoc for this platform or empty collection if the location is not set or invalid

Returns:
List<URL> never returns null

getDefault

public static JavaPlatform getDefault()
Get the "default platform", meaning the JDK on which NetBeans itself is running.

Returns:
the default platform, if it can be found, or null
See Also:
JavaPlatformManager.getDefaultPlatform()

firePropertyChange

protected final void firePropertyChange(String propName,
                                        Object oldValue,
                                        Object newValue)
Fires PropertyChange to all registered PropertyChangeListeners

Parameters:
propName -
oldValue -
newValue -

setSystemProperties

protected final void setSystemProperties(Map sysproperties)
Sets the system properties of java platform.

Parameters:
sysproperties - the java platform system properties

org.netbeans.modules.java.platform/1 1.7.22

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.