clazz
This is the home page for the clazz module.
What does it do ?
The Clazz module allows the IDE to operate on compiled Java classes and object
serialized into files. Like Java module, the Clazz module can produce a view what
methods, fields, constructors and inner classes are present in a compiled file. It also
serves this information to other modules not only for classes that are mounted in the
Filesystems, but for all classes that can be accessed by the IDE that makes code
synchronization possible even with classes inside the JDK.
The module can be enhanced by other modules in the IDE: for example
Bean Patterns will analyze the contents
of the .class file and shows you properties and event sources just like
it does for Java source files.
Let's have a closer look at the module's features:
- Compiled
.class file parsing
The module will parse the compiled file and will try to find out what methods,
constructors and fields are defined in the .class file. The results
are presented as nodes underneath the file node just as the Java module does for
Java source files. You can inspect details of each element using properties or customizers.
Note that since the module works on compiled files, no modifications are permitted.
- Serialized object support
The module adds some nice features to serialized objects too. The serialized node
will show the Java Hierarchy for the object serialized in the file. You can easily
see what object is serialized in that particular file and what methods/fields does
it define without having to look the relevant class up in the Filesystems or even
JDK or third party libraries.
Nodes that are created for the various code elements found in inspected classes offer
a variety of actions that can be done with individual elements. Unlike the Java module,
the Clazz module works on already compiled files that can't be modified - so actions
that alter contents or properties are only available for serialized objects.
- Properties
The Properties window for nodes created by Java module shows various attributes
for individual code elements:
- superclass and superinterfaces for classes,
- type for fields,
- type of parameters, their names and checked exceptions thrown by constructors,
- return type in addition to the above for methods.
Other module can plug in and add its own properties, as
JavaDoc module does with "JavaDoc comment
" property. However (unlike properties provided by the Java module), Property values can notbe edited and modified; Java module will change the source
text accordingly to the new property's value.
- Customizers
are available for all node types. A customizer allows you
to customize all aspect of a node (or the data it represents) in a nice GUI. It
offers a type of view different from Property Sheet that many users might find
more intuitive. Please see an example from the
See Java module's website of how customizers
look like.
- Copy/Paste - serialize
Copy-Paste feature is supported for both .class objects as well as for
serialized data. While the serialized data can be simply copied to another place,
compiled classes can't be copied this way because the record their packages inside
the file and cannot be placed at different position. Because of that, the module will
serialize an instance of the class you copied to the target folder.
More documentation
.. will be available shortly:
- Detailed user documentation
- Requirements specification
- Functional specification
- Documentation for developers
Want to comment or help ?
The module offers only rudimentary operations that can be done with sourceless classes and
serialized objects. If you can think of another operations, or views that the module could
offer to make work with the classes easier, please don't hesitate to use
NetBeans mailing lists to make suggestions or
discuss features for this module.