public abstract class JavaPlatform extends Object
Modifier and Type | Field and Description |
---|---|
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
|
Modifier | Constructor and Description |
---|---|
protected |
JavaPlatform()
Creates a new instance of JavaPlatform
|
Modifier and Type | Method and Description |
---|---|
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<FileObject> |
getInstallFolders()
Retrieves a collection of
FileObject s of one or more folders
where the Platform is installed. |
abstract List<URL> |
getJavadocFolders()
Returns the locations of the Javadoc for this platform
or empty collection if the location is not set or invalid
|
abstract Map<String,String> |
getProperties()
Gets some ad-hoc properties defined for this 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<String,String> |
getSystemProperties()
Gets the java platform system properties.
|
abstract String |
getVendor()
Returns the vendor of the Java SDK
|
boolean |
isValid()
Checks if the
JavaPlatform is valid. |
void |
removePropertyChangeListener(PropertyChangeListener l)
Removes a listener registered previously
|
protected void |
setSystemProperties(Map<String,String> sysproperties)
Sets the system properties of java platform.
|
public static final String PROP_DISPLAY_NAME
public static final String PROP_SOURCE_FOLDER
public static final String PROP_JAVADOC_FOLDER
public static final String PROP_SYSTEM_PROPERTIES
public abstract String getDisplayName()
public final void addPropertyChangeListener(PropertyChangeListener l)
public final void removePropertyChangeListener(PropertyChangeListener l)
public abstract Map<String,String> getProperties()
Implementations are however advised to include the key
platform.ant.name
if they wish to be used in Ant builds;
the value default_platform
is conventionally associated
with the default platform.
public final Map<String,String> getSystemProperties()
public abstract ClassPath getBootstrapLibraries()
public abstract ClassPath getStandardLibraries()
public abstract String getVendor()
public abstract Specification getSpecification()
public abstract Collection<FileObject> getInstallFolders()
FileObject
s 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.public abstract FileObject findTool(String toolName)
toolName
- the tool platform independent tool name.public abstract ClassPath getSourceFolders()
public abstract List<URL> getJavadocFolders()
public boolean isValid()
JavaPlatform
is valid.JavaPlatform
is valid,
false when broken.public static JavaPlatform getDefault()
JavaPlatformManager.getDefaultPlatform()
protected final void firePropertyChange(String propName, Object oldValue, Object newValue)
propName
- oldValue
- newValue
-