Java Doc for Module.java in  » IDE-Netbeans » library » org » netbeans » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » library » org.netbeans 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.netbeans.Module

All known Subclasses:   org.netbeans.StandardModule,  org.netbeans.FixedModule,
Module
abstract public class Module extends ModuleInfo (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
since:
   2.1 the class was made public abstract

Inner Class :final public static class PackageExport

Field Summary
final public static  StringPROP_CLASS_LOADER
    
final public static  StringPROP_MANIFEST
    
final public static  StringPROP_PROBLEMS
    
final public static  StringPROP_RELOADABLE
    
final public static  StringPROP_VALID
    
protected  ClassLoaderclassloader
    
final protected  Eventsevents
    
final protected  ModuleManagermgr
    
protected  booleanreloadable
    

Constructor Summary
protected  Module(ModuleManager mgr, Events ev, Object history, boolean reloadable, boolean autoload, boolean eager)
     Use ModuleManager.create as a factory.
protected  Module(ModuleManager mgr, Events ev, Object history, ClassLoader classloader)
     Create a special-purpose "fixed" JAR.
protected  Module(ModuleManager mgr, Events ev, Object history, ClassLoader classloader, boolean autoload, boolean eager)
     Create a special-purpose "fixed" JAR which may nonetheless be marked eager or autoload.

Method Summary
abstract protected  voidclassLoaderDown()
     Turn off the classloader and release all resources.
abstract protected  voidclassLoaderUp(Set<Module> parents)
     Turn on the classloader.
abstract protected  voidcleanup()
     Should be called after turning off the classloader of one or more modules & GC'ing.
abstract protected  voiddestroy()
     Notify the module that it is being deleted.
final  voidfirePropertyChange0(String prop, Object old, Object nue)
    
abstract public  List<File>getAllJars()
     Get all JARs loaded by this module.
public  ObjectgetAttribute(String attr)
     Get an associated arbitrary attribute. Right now, simply provides the main attributes of the manifest. In the future some of these could be suppressed (if only of dangerous interest, e.g.
public  ClassLoadergetClassLoader()
    
public  StringgetCodeName()
    
public  StringgetCodeNameBase()
    
public  intgetCodeNameRelease()
    
public  Set<Dependency>getDependencies()
    
final public  Dependency[]getDependenciesArray()
    
final public  ObjectgetHistory()
     Get the history object representing what has happened to this module before.
public  FilegetJarFile()
     Get the JAR this module is packaged in.
public  ModuleManagergetManager()
     Get the associated module manager.
abstract public  ManifestgetManifest()
     Get the JAR manifest.
public  Set<Object>getProblems()
     Get a set of org.openide.modules.Dependency objects representing missed dependencies. This module is examined to see why it would not be installable. If it is enabled, there are no problems. If it is in fact installable (possibly only by also enabling some other managed modules which are currently disabled), and all of its non-module dependencies are met, the returned set will be empty. Otherwise it will contain a list of reasons why this module cannot be installed: non-module dependencies which are not met; and module dependencies on modules which either do not exist in the managed set, or are the wrong version, or themselves cannot be installed for some reason or another (which may be separately examined). Note that in the (illegal) situation of two or more modules forming a cyclic dependency cycle, none of them will be installable, and the missing dependencies for each will be stated as the dependencies on the others.
public  String[]getProvides()
    
public  PackageExport[]getPublicPackages()
     Get all packages exported by this module to other modules.
public  SpecificationVersiongetSpecificationVersion()
    
public  booleanisAutoload()
     Is this module automatically loaded? If so, no information about its state is kept permanently beyond the existence of its JAR file; it is enabled when some real module needs it to be, and disabled when this is no longer the case.
 booleanisDeclaredAsFriend(Module module)
     Checks whether we use friends attribute and if so, then whether the name of module is listed there.
public  booleanisEager()
     Is this module eagerly enabled? If so, no information about its state is kept permanently. It is turned on whenever it can be, i.e.
public  booleanisEnabled()
    
abstract public  booleanisFixed()
     Fixed modules are treated differently.
public  booleanisReloadable()
     Is this module supposed to be easily reloadable? If so, it is suitable for testing inside the IDE.
public  booleanisValid()
     Normally a module once created and managed is valid (that is, either installed or not, but at least managed).
public  booleanowns(Class clazz)
    
protected  voidparseManifest()
     Parse information from the current manifest.
final public  booleanprovides(String token)
     Test whether the module provides a given token or not.
public  voidreleaseManifest()
     Release memory storage for the JAR manifest, if applicable.
abstract public  voidreload()
     Reload this module.
 voidsetEnabled(boolean enabled)
    
abstract public  voidsetReloadable(boolean r)
     Set whether this module is supposed to be reloadable.
public  StringtoString()
     String representation for debugging.

Field Detail
PROP_CLASS_LOADER
final public static String PROP_CLASS_LOADER(Code)



PROP_MANIFEST
final public static String PROP_MANIFEST(Code)



PROP_PROBLEMS
final public static String PROP_PROBLEMS(Code)



PROP_RELOADABLE
final public static String PROP_RELOADABLE(Code)



PROP_VALID
final public static String PROP_VALID(Code)



classloader
protected ClassLoader classloader(Code)
currently active module classloader



events
final protected Events events(Code)
event logging (should not be much here)



mgr
final protected ModuleManager mgr(Code)
manager which owns this module



reloadable
protected boolean reloadable(Code)




Constructor Detail
Module
protected Module(ModuleManager mgr, Events ev, Object history, boolean reloadable, boolean autoload, boolean eager) throws IOException(Code)
Use ModuleManager.create as a factory.



Module
protected Module(ModuleManager mgr, Events ev, Object history, ClassLoader classloader) throws InvalidException(Code)
Create a special-purpose "fixed" JAR.



Module
protected Module(ModuleManager mgr, Events ev, Object history, ClassLoader classloader, boolean autoload, boolean eager) throws InvalidException(Code)
Create a special-purpose "fixed" JAR which may nonetheless be marked eager or autoload.
since:
   2.7




Method Detail
classLoaderDown
abstract protected void classLoaderDown()(Code)
Turn off the classloader and release all resources.



classLoaderUp
abstract 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
abstract protected void cleanup()(Code)
Should be called after turning off the classloader of one or more modules & GC'ing.



destroy
abstract protected void destroy()(Code)
Notify the module that it is being deleted.



firePropertyChange0
final void firePropertyChange0(String prop, Object old, Object nue)(Code)



getAllJars
abstract 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 of JARs



getAttribute
public Object getAttribute(String attr)(Code)
Get an associated arbitrary attribute. Right now, simply provides the main attributes of the manifest. In the future some of these could be suppressed (if only of dangerous interest, e.g. Class-Path) or enhanced with other information available from the core (if needed).



getClassLoader
public ClassLoader getClassLoader() throws IllegalArgumentException(Code)



getCodeName
public String getCodeName()(Code)



getCodeNameBase
public String getCodeNameBase()(Code)



getCodeNameRelease
public int getCodeNameRelease()(Code)



getDependencies
public Set<Dependency> getDependencies()(Code)



getDependenciesArray
final public Dependency[] getDependenciesArray()(Code)



getHistory
final public Object getHistory()(Code)
Get the history object representing what has happened to this module before.
See Also:   ModuleHistory



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:   Module.isFixed



getManager
public ModuleManager getManager()(Code)
Get the associated module manager.



getManifest
abstract public Manifest getManifest()(Code)
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.



getProblems
public Set<Object> getProblems()(Code)
Get a set of org.openide.modules.Dependency objects representing missed dependencies. This module is examined to see why it would not be installable. If it is enabled, there are no problems. If it is in fact installable (possibly only by also enabling some other managed modules which are currently disabled), and all of its non-module dependencies are met, the returned set will be empty. Otherwise it will contain a list of reasons why this module cannot be installed: non-module dependencies which are not met; and module dependencies on modules which either do not exist in the managed set, or are the wrong version, or themselves cannot be installed for some reason or another (which may be separately examined). Note that in the (illegal) situation of two or more modules forming a cyclic dependency cycle, none of them will be installable, and the missing dependencies for each will be stated as the dependencies on the others. Again other modules dependent on modules in the cycle will list failed dependencies on the cyclic modules. Missing package dependencies are not guaranteed to be reported unless an install of the module has already been attempted, and failed due to them. The set may also contain InvalidException s representing known failures of the module to be installed, e.g. due to classloader problems, missing runtime resources, or failed ad-hoc dependencies. Again these are not guaranteed to be reported unless an install has already been attempted and failed due to them.



getProvides
public String[] getProvides()(Code)



getPublicPackages
public PackageExport[] getPublicPackages()(Code)
Get all packages exported by this module to other modules. a list (possibly empty) of exported packages, or null to export everything
since:
   org.netbeans.core/1 > 1.4
See Also:    "#19621"



getSpecificationVersion
public SpecificationVersion getSpecificationVersion()(Code)



isAutoload
public boolean isAutoload()(Code)
Is this module automatically loaded? If so, no information about its state is kept permanently beyond the existence of its JAR file; it is enabled when some real module needs it to be, and disabled when this is no longer the case.
See Also:    #9779



isDeclaredAsFriend
boolean isDeclaredAsFriend(Module module)(Code)
Checks whether we use friends attribute and if so, then whether the name of module is listed there.



isEager
public boolean isEager()(Code)
Is this module eagerly enabled? If so, no information about its state is kept permanently. It is turned on whenever it can be, i.e. whenever it meets all of its dependencies. This may be used to implement "bridge" modules with simple functionality that just depend on two normal modules. A module may not be simultaneously eager and autoload.
See Also:    #17501
since:
   org.netbeans.core/1 1.3



isEnabled
public boolean isEnabled()(Code)



isFixed
abstract public boolean isFixed()(Code)
Fixed modules are treated differently.
See Also:   FixedModule



isReloadable
public boolean isReloadable()(Code)
Is this module supposed to be easily reloadable? If so, it is suitable for testing inside the IDE. Controls whether a copy of the JAR file is made before passing it to the classloader, which can affect locking and refreshing of the JAR.



isValid
public boolean isValid()(Code)
Normally a module once created and managed is valid (that is, either installed or not, but at least managed). If it is deleted any remaining references to it become invalid.



owns
public boolean owns(Class clazz)(Code)



parseManifest
protected void parseManifest() throws InvalidException(Code)
Parse information from the current manifest. Includes code name, specification version, and dependencies. If anything is in an invalid format, throws an exception with some kind of description of the problem.



provides
final public boolean provides(String token)(Code)
Test whether the module provides a given token or not.
since:
   JST-PENDING again used from NbProblemDisplayer



releaseManifest
public void releaseManifest()(Code)
Release memory storage for the JAR manifest, if applicable.



reload
abstract 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.
since:
   JST-PENDING: needed from ModuleSystem



setEnabled
void setEnabled(boolean enabled)(Code)



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



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.