| org.netbeans.Module org.netbeans.FixedModule
FixedModule | final class FixedModule 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 |
Constructor Summary | |
public | FixedModule(ModuleManager mgr, Events ev, Manifest manifest, Object history, ClassLoader classloader) Create a special-purpose "fixed" JAR. | public | FixedModule(ModuleManager mgr, Events ev, Manifest manifest, Object history, ClassLoader classloader, boolean autoload, boolean eager) Create a special-purpose "fixed" JAR which may nonetheless be marked eager or autoload. |
Method Summary | |
protected void | classLoaderDown() Turn off the classloader and release all resources. | protected void | classLoaderUp(Set parents) Turn on the classloader. | protected void | cleanup() Should be called after turning off the classloader of one or more modules & GC'ing. | protected void | destroy() Notify the module that it is being deleted. | public List<File> | getAllJars() Get all JARs loaded by this module. | 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 void | reload() Reload this module. | public void | setReloadable(boolean r) This method can be overriden
in subclasses in case they want to change the reloadable semantix
of the fixed modules. | 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 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 | protected 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 |
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) | | |
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.
throws: IllegalStateException - as FixedModule cannot be reloaded |
setReloadable | public void setReloadable(boolean r)(Code) | | This method can be overriden
in subclasses in case they want to change the reloadable semantix
of the fixed modules.
throws: IllegalStateException - as FixedModule cannot be reloaded |
toString | public String toString()(Code) | | String representation for debugging.
|
|
|