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

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

 

org.netbeans.api.java.platform
Class JavaPlatformManager

java.lang.Object
  extended byorg.netbeans.api.java.platform.JavaPlatformManager

public final class JavaPlatformManager
extends Object

JavaPlatformManager provides access to list of installed Java Platforms in the system. It can enumerate them, assign serializable IDs to their instances. It also defines a `default' platform, which represents NetBeans' own runtime environment.


Field Summary
static String PROP_INSTALLED_PLATFORMS
          Property name of the installedPlatforms property
 
Constructor Summary
JavaPlatformManager()
          Creates a new instance of JavaPlatformManager
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Adds PropertyChangeListener to the JavaPlatformManager, the listener is notified when the platform is added,removed or modified.
static JavaPlatformManager getDefault()
          Gets an instance of JavaPlatformManager.
 JavaPlatform getDefaultPlatform()
          Returns default platform.
 JavaPlatform[] getInstalledPlatforms()
          Gets an array of JavaPlatfrom objects.
 JavaPlatform[] getPlatforms(String platformDisplayName, Specification platformSpec)
          Returns platform given by display name and/or specification.
 void removePropertyChangeListener(PropertyChangeListener l)
          Removes PropertyChangeListener to the JavaPlatformManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_INSTALLED_PLATFORMS

public static final String PROP_INSTALLED_PLATFORMS
Property name of the installedPlatforms property

See Also:
Constant Field Values
Constructor Detail

JavaPlatformManager

public JavaPlatformManager()
Creates a new instance of JavaPlatformManager

Method Detail

getDefault

public static JavaPlatformManager getDefault()
Gets an instance of JavaPlatformManager. It the instance doesn't exist it will be created.

Returns:
the instance of JavaPlatformManager

getDefaultPlatform

public JavaPlatform getDefaultPlatform()
Returns default platform. The platform the IDE is running on.

Returns:
JavaPlatform or null in the case when the default platform can not be found (e.g. the J2SEPlatform module is not installed).

getInstalledPlatforms

public JavaPlatform[] getInstalledPlatforms()
Gets an array of JavaPlatfrom objects.

Returns:
the array of java platform definitions.

getPlatforms

public JavaPlatform[] getPlatforms(String platformDisplayName,
                                   Specification platformSpec)
Returns platform given by display name and/or specification.

Parameters:
platformDisplayName - display name of platform or null for any name.
platformSpec - Specification of platform or null for platform of any type, in the specification null means all. Specification with null profiles means none or any profile. Specification with Profile(null,null) means any profile but at least 1. For example Specification ("CLDC", new Profile[] { new Profile("MIMDP",null), new Profile(null,null)}) matches all CLDC platforms with MIDP profile of any versions and any additional profile.
Returns:
JavaPlatform[], never returns null, may return empty array when no platform matches given query.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Adds PropertyChangeListener to the JavaPlatformManager, the listener is notified when the platform is added,removed or modified.

Parameters:
l - the listener, can not be null

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Removes PropertyChangeListener to the JavaPlatformManager.

Parameters:
l - the listener, can not be null

 

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