|
org.openide.modules 7.6 | |||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Module System API | |
---|---|
org.openide.modules | NetBeans is capable of being extended by pluggable modules providing additional functionality. |
Packages supplied in a module which overlap those in the JRE or its extensions will normally be ignored (as usual, the JRE takes precedence). Modules which wish to specifically suppress loading of some packages from the classpath can now request the class loader to do so by specifying:
OpenIDE-Module-Hide-Classpath-Packages: javax.lang.model.*, com.sun.source.**
(The syntax is analogous to that of OpenIDE-Module-Public-Packages
.)
Such a declaration affects not just this module, but any other modules declaring a direct
dependency on it (OpenIDE-Module-Module-Dependencies
). The module is now free to bundle
its own versions of these classes and be sure they will be used by it and its clients.
Be aware that as with all changes to the normal class loading scheme,
careless usage could result in LinkageError
s.
FileObject
Modules used to be able to obtain their own entries as file objects, e.g.:
FileObject f = URLMapper.findFileObject(ThisClass.class.getResource("something.xml"));
This is no longer supported. Client code should either use module classpath entries directly as URLs; or register files of interest in the XML layer and refer to them using the system filesystem.
To support performance and functional improvements in module class loading,
module resources are now loaded using a custom URL protocol, nbjcl
.
This can be observed e.g. using ThisClass.class.getResource("file.xml")
.
As before, the exact nature of the URL produced by a module class loader
is formally left unspecified as this is specific to the module system implementation.
Modules can now express dependencies on
org.openide.modules.os.Linux
and
org.openide.modules.os.Solaris
.
For more details read here.
FileObject
s created on XML layer now support a new
attribute "removeWritables"
returning an instance of
Callable
which removes the local writable version of the
given FileObject
thus reverting the folder or file to
its initial state as defined in XML layers. Please note that is *not*
possible to reset FileObject
's attributes.
|
|
Read more about the implementation in the answers to architecture questions.
|
org.openide.modules 7.6 | |||||||||
PREV NEXT | FRAMES NO FRAMES |