|
org.netbeans.bootstrap/1 2.52 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.ModuleInstaller
public abstract class ModuleInstaller
Responsible for actually installing the contents of module JARs into the IDE. While the manager tracks which modules are enabled and their dependencies, the installer actually understands the manifest contents and is able to add layers, sections, etc. to the IDE's runtime.
| Constructor Summary | |
|---|---|
protected |
ModuleInstaller()
No-op constructor for subclasses. |
| Method Summary | |
|---|---|
protected void |
classLoaderUp(ClassLoader cl)
Tells the installer that new classloader is ready for use. |
abstract void |
close(List<Module> modules)
Notify modules the IDE will be shut down. |
abstract boolean |
closing(List<Module> modules)
Ask to shut down the IDE from a set of modules. |
abstract void |
dispose(Module m)
Called when a module is being uninstalled and runtime information about it is no longer needed. |
abstract void |
load(List<Module> modules)
Actually load some modules into the IDE. |
protected Set<Dependency> |
loadDependencies(String cnb)
Loads dependencies cached from previous run, if possible. |
Manifest |
loadManifest(File jar)
Scan a disabled module JAR file for its manifest contents. |
abstract void |
prepare(Module m)
Called to ensure that a module is valid to be installed, before continuing. |
void |
refineClassLoader(Module m,
List parents)
Permit a module installer to add extra parent classloaders for a module. |
void |
refineDependencies(Module m,
Set<Dependency> dependencies)
Optionally refine the dependencies for a module. |
String[] |
refineProvides(Module m)
Optionally adds additional token for the module. |
boolean |
shouldDelegateClasspathResource(String pkg)
Similar to shouldDelegateResource(org.netbeans.Module, org.netbeans.Module, java.lang.String) but checks whether the
system class loader should delegate to the classpath. |
boolean |
shouldDelegateResource(Module m,
Module parent,
String pkg)
Optionally mask package use in a module classloader. |
abstract void |
unload(List<Module> modules)
Unload some modules from the IDE. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ModuleInstaller()
| Method Detail |
|---|
public abstract void prepare(Module m)
throws InvalidException
InvalidExceptionpublic abstract void dispose(Module m)
protected void classLoaderUp(ClassLoader cl)
public abstract void load(List<Module> modules)
public abstract void unload(List<Module> modules)
public abstract boolean closing(List<Module> modules)
public abstract void close(List<Module> modules)
public void refineDependencies(Module m,
Set<Dependency> dependencies)
m - a module to possibly refine dependencies for; overriders must not call
getDependencies on this module nor attempt to directly change it
in any way; overriders may ask for module code name, version, etc.dependencies - a set of Dependency's; mutable, entries may be added or removed
during the dynamic scope of this call
public boolean shouldDelegateResource(Module m,
Module parent,
String pkg)
The module system automatically excludes improper access
to non-public packages (as declared via OpenIDE-Module-Public-Packages)
and cross-module access to the META-INF/ directory.
The default implementation of this method permits all other package delegation.
m - the module requesting use of a given packageparent - the module which might possibly supply that package, or
null if the possible provider is not a module (i.e. application
classpath)pkg - the name of the package in use, in the form "org/netbeans/modules/foo/"
(i.e. slash-separated and ending in a slash as well)public boolean shouldDelegateClasspathResource(String pkg)
shouldDelegateResource(org.netbeans.Module, org.netbeans.Module, java.lang.String) but checks whether the
system class loader should delegate to the classpath.
pkg - as in shouldDelegateResource(org.netbeans.Module, org.netbeans.Module, java.lang.String)
public Manifest loadManifest(File jar)
throws IOException
The default implementation simply opens the JAR and gets its manifest using the standard JRE calls.
Never called for reloadable JARs.
jar - a module JAR to open
IOException - if the JAR cannot be opened or does not have a manifest at all
public void refineClassLoader(Module m,
List parents)
m - a module which is about to be enabledparents - current list of ClassLoader parents; may be mutated (appended to)public String[] refineProvides(Module m)
m - the module to add token to
protected Set<Dependency> loadDependencies(String cnb)
cnb - the code name base of the module to get dependencies for
|
org.netbeans.bootstrap/1 2.52 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||