org.openide.modules
Class ModuleInfo

java.lang.Object
  |
  +--org.openide.modules.ModuleInfo

public abstract class ModuleInfo
extends Object

General information about a module. Immutable from an API perspective, serves as a source of information only. All instances may be gotten via lookup. It is forbidden for module code to register instances of this class.

Since:
1.24

Field Summary
static String PROP_ENABLED
          Property name fired when enabled or disabled.
 
Constructor Summary
protected ModuleInfo()
          Do-nothing constructor.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          If true, this class name is supposed to be loaded by this module.
protected  void firePropertyChange(String prop, Object old, Object nue)
          Indicate that something changed, as a subclass.
abstract  Object getAttribute(String attr)
          Get some attribute, for example OpenIDE-Module-Name.
abstract  String getCodeName()
          The full code name, with release version after slash if defined.
abstract  String getCodeNameBase()
          The code name of the module, sans release version.
abstract  int getCodeNameRelease()
          The release version (-1 if undefined).
abstract  Set getDependencies()
          Get a list of all dependencies this module has.
 String getDisplayName()
          Get a localized display name, if available.
 String getImplementationVersion()
          The implementation version, or null.
abstract  Object getLocalizedAttribute(String attr)
          Get an attribute with localization.
abstract  SpecificationVersion getSpecificationVersion()
          The specification version, or null.
abstract  boolean isEnabled()
          Whether the module is currently enabled.
abstract  boolean owns(Class clazz)
          Determine if the provided class was loaded as a part of this module, and thus will only be loadable later if this module is enabled.
 void removePropertyChangeListener(PropertyChangeListener l)
          Remove a change listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_ENABLED

public static final String PROP_ENABLED
Property name fired when enabled or disabled. For changes in other attributes, property name can match manifest attribute name, for example OpenIDE-Module-Specification-Version after upgrade.
Constructor Detail

ModuleInfo

protected ModuleInfo()
Do-nothing constructor.
Method Detail

getCodeNameBase

public abstract String getCodeNameBase()
The code name of the module, sans release version.

getCodeNameRelease

public abstract int getCodeNameRelease()
The release version (-1 if undefined).

getCodeName

public abstract String getCodeName()
The full code name, with release version after slash if defined.

getDisplayName

public String getDisplayName()
Get a localized display name, if available. As a fallback provides the code name (base). Convenience method only.

getSpecificationVersion

public abstract SpecificationVersion getSpecificationVersion()
The specification version, or null.

getImplementationVersion

public String getImplementationVersion()
The implementation version, or null. Convenience method only.

isEnabled

public abstract boolean isEnabled()
Whether the module is currently enabled.

getAttribute

public abstract Object getAttribute(String attr)
Get some attribute, for example OpenIDE-Module-Name. Not all manifest attributes need be supported here. Attributes not present in the manifest may be available.

getLocalizedAttribute

public abstract Object getLocalizedAttribute(String attr)
Get an attribute with localization. That is, if there is a suitable locale variant of the attribute name, return its value rather than the value of the base attribute.

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyChangeListener l)
If true, this class name is supposed to be loaded by this module. * / // [PENDING] public abstract boolean ownsClass(String clazz); /** Add a change listener.

removePropertyChangeListener

public final void removePropertyChangeListener(PropertyChangeListener l)
Remove a change listener.

firePropertyChange

protected final void firePropertyChange(String prop,
                                        Object old,
                                        Object nue)
Indicate that something changed, as a subclass. Changes are fired synchronously (but this method need not be called synchronously).

getDependencies

public abstract Set getDependencies()
Get a list of all dependencies this module has.

owns

public abstract boolean owns(Class clazz)
Determine if the provided class was loaded as a part of this module, and thus will only be loadable later if this module is enabled. If in doubt, return false.
Since:
1.28


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.