站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

JavaPlatform (NetBeans Java Platform API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.api.java.platform
Class JavaPlatform

java.lang.Object
  extended byorg.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()
           
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()
Returns:
the default platform.

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

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.