org.netbeans.bootstrap/1 2.52

org.netbeans
Class JaveleonModule

java.lang.Object
  extended by org.openide.modules.ModuleInfo
      extended by org.netbeans.Module
          extended by org.netbeans.JaveleonModule

public final class JaveleonModule
extends Module


Nested Class Summary
 
Nested classes/interfaces inherited from class org.netbeans.Module
Module.PackageExport
 
Field Summary
static boolean isJaveleonPresent
           
 
Fields inherited from class org.netbeans.Module
classloader, events, mgr, PROP_CLASS_LOADER, PROP_MANIFEST, PROP_PROBLEMS, PROP_RELOADABLE, PROP_VALID, reloadable
 
Fields inherited from class org.openide.modules.ModuleInfo
PROP_ENABLED
 
Constructor Summary
JaveleonModule(ModuleManager mgr, File jar, Object history, Events ev)
           
 
Method Summary
protected  void classLoaderDown()
          Turn off the classloader and release all resources.
 void classLoaderUp(Set<Module> parents)
          public for use from JaveleonModuleReloader
protected  void cleanup()
          Should be called after turning off the classloader of one or more modules & GC'ing.
protected  ClassLoader createNewClassLoader(List<File> classp, List<ClassLoader> parents)
          Setup a new module with the given class path and the set of parent class loaders.
 void destroy()
          Notify the module that it is being deleted.
 List<File> getAllJars()
          Get all JARs loaded by this module.
 File getJarFile()
          Get the JAR this module is packaged in.
 Object getLocalizedAttribute(String attr)
          Get a localized attribute.
 Manifest getManifest()
          Get the JAR manifest.
protected  ClassLoader getParentLoader(Module parent)
          Get the class loader of a particular parent module.
static boolean incrementGlobalId()
           
 boolean isFixed()
          Fixed modules are treated differently.
 void releaseManifest()
          Release memory storage for the JAR manifest, if applicable.
 void reload()
          Reload this module.
 void setReloadable(boolean r)
          Set whether this module is supposed to be reloadable.
 String toString()
          String representation for debugging.
 
Methods inherited from class org.netbeans.Module
findResources, getAttribute, getBuildVersion, getClassLoader, getCodeName, getCodeNameBase, getCodeNameRelease, getDependencies, getDependenciesArray, getHistory, getImplementationVersion, getManager, getProblems, getProvides, getPublicPackages, getSpecificationVersion, getStartLevel, isAutoload, isEager, isEnabled, isNetigso, isReloadable, isValid, owns, parseManifest, provides
 
Methods inherited from class org.openide.modules.ModuleInfo
addPropertyChangeListener, firePropertyChange, getDisplayName, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isJaveleonPresent

public static final boolean isJaveleonPresent
Constructor Detail

JaveleonModule

public JaveleonModule(ModuleManager mgr,
                      File jar,
                      Object history,
                      Events ev)
               throws IOException
Throws:
IOException
Method Detail

incrementGlobalId

public static boolean incrementGlobalId()

createNewClassLoader

protected ClassLoader createNewClassLoader(List<File> classp,
                                           List<ClassLoader> parents)
Setup a new module with the given class path and the set of parent class loaders.


classLoaderUp

public void classLoaderUp(Set<Module> parents)
                   throws IOException
public for use from JaveleonModuleReloader

Throws:
IOException

getParentLoader

protected ClassLoader getParentLoader(Module parent)
Get the class loader of a particular parent module.


toString

public String toString()
String representation for debugging.


classLoaderDown

protected void classLoaderDown()
Turn off the classloader and release all resources.


reload

public final void reload()
                  throws IOException
Reload this module. Access from ModuleManager. If an exception is thrown, the module is considered to be in an invalid state.

Throws:
IOException

cleanup

protected void cleanup()
Should be called after turning off the classloader of one or more modules & GC'ing.


destroy

public void destroy()
Notify the module that it is being deleted.


getManifest

public Manifest getManifest()
Description copied from class: Module
Get the JAR manifest. Should never be null, even if disabled. Might change if a module is reloaded. It is not guaranteed that change events will be fired for changes in this property.

Specified by:
getManifest in class Module

releaseManifest

public void releaseManifest()
Description copied from class: Module
Release memory storage for the JAR manifest, if applicable.

Overrides:
releaseManifest in class Module

getLocalizedAttribute

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. 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.

Specified by:
getLocalizedAttribute in class ModuleInfo

isFixed

public boolean isFixed()
Description copied from class: Module
Fixed modules are treated differently.

Specified by:
isFixed in class Module
See Also:
FixedModule

getJarFile

public File getJarFile()
Get the JAR this module is packaged in. May be null for modules installed specially, e.g. automatically from the classpath.

Overrides:
getJarFile in class Module
See Also:
isFixed()

getAllJars

public List<File> getAllJars()
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.

Specified by:
getAllJars in class Module
Returns:
a List<File> of JARs

setReloadable

public void setReloadable(boolean r)
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.

Specified by:
setReloadable in class Module
Parameters:
r - whether the module should be considered reloadable

org.netbeans.bootstrap/1 2.52

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.