| org.netbeans.Module org.netbeans.StandardModule
StandardModule | final class StandardModule extends Module (Code) | | Object representing one module, possibly installed.
Responsible for opening of module JAR file; reading
manifest; parsing basic information such as dependencies;
and creating a classloader for use by the installer.
Methods not defined in ModuleInfo must be called from within
the module manager's read mutex as a rule.
author: Jesse Glick |
Method Summary | |
protected void | classLoaderDown() Turn off the classloader and release all resources. | protected void | classLoaderUp(Set<Module> parents) Turn on the classloader. | protected void | cleanup() Should be called after turning off the classloader of one or more modules & GC'ing. | public void | destroy() Notify the module that it is being deleted. | public List<File> | getAllJars() Get all JARs loaded by this module. | public File | getJarFile() Get the JAR this module is packaged in. | public Object | getLocalizedAttribute(String attr) Get a localized attribute.
First, if OpenIDE-Module-Localizing-Bundle was given, the specified
bundle file (in all locale JARs as well as base JAR) is searched for
a key of the specified name.
Otherwise, the manifest's main attributes are searched for an attribute
with the specified name, possibly with a locale suffix.
If the attribute name contains a slash, and there is a manifest section
named according to the part before the last slash, then this section's attributes
are searched instead of the main attributes, and for the attribute listed
after the slash. | public Manifest | getManifest() | public boolean | isFixed() | public boolean | owns(Class clazz) | public void | releaseManifest() | public void | reload() Reload this module. | public void | setReloadable(boolean r) Set whether this module is supposed to be reloadable. | public String | toString() String representation for debugging. |
classLoaderDown | protected void classLoaderDown()(Code) | | Turn off the classloader and release all resources.
|
classLoaderUp | protected void classLoaderUp(Set<Module> parents) throws IOException(Code) | | Turn on the classloader. Passed a list of parent modules to use.
The parents should already have had their classloaders initialized.
|
cleanup | protected void cleanup()(Code) | | Should be called after turning off the classloader of one or more modules & GC'ing.
|
destroy | public void destroy()(Code) | | Notify the module that it is being deleted.
|
getAllJars | public List<File> getAllJars()(Code) | | Get all JARs loaded by this module.
Includes the module itself, any locale variants of the module,
any extensions specified with Class-Path, any locale variants
of those extensions.
The list will be in classpath order (patches first).
Currently the temp JAR is provided in the case of test modules, to prevent
sporadic ZIP file exceptions when background threads (like Java parsing) tries
to open libraries found in the library path.
JARs already present in the classpath are not listed.
a List<File> of JARs |
getJarFile | public File getJarFile()(Code) | | Get the JAR this module is packaged in.
May be null for modules installed specially, e.g.
automatically from the classpath.
See Also: StandardModule.isFixed |
getLocalizedAttribute | public Object getLocalizedAttribute(String attr)(Code) | | Get a localized attribute.
First, if OpenIDE-Module-Localizing-Bundle was given, the specified
bundle file (in all locale JARs as well as base JAR) is searched for
a key of the specified name.
Otherwise, the manifest's main attributes are searched for an attribute
with the specified name, possibly with a locale suffix.
If the attribute name contains a slash, and there is a manifest section
named according to the part before the last slash, then this section's attributes
are searched instead of the main attributes, and for the attribute listed
after the slash. Currently this would only be useful for localized filesystem
names. E.g. you may request the attribute org/foo/MyFileSystem.class/Display-Name.
In the future certain attributes known to be dangerous could be
explicitly suppressed from this list; should only be used for
documented localizable attributes such as OpenIDE-Module-Name etc.
|
isFixed | public boolean isFixed()(Code) | | |
releaseManifest | public void releaseManifest()(Code) | | |
reload | public void reload() throws IOException(Code) | | Reload this module. Access from ModuleManager.
If an exception is thrown, the module is considered
to be in an invalid state.
|
setReloadable | public void setReloadable(boolean r)(Code) | | Set whether this module is supposed to be reloadable.
Has no immediate effect, only impacts what happens the
next time it is enabled (after having been disabled if
necessary).
Must be called from within a write mutex.
Parameters: r - whether the module should be considered reloadable |
toString | public String toString()(Code) | | String representation for debugging.
|
|
|