The org.netbeans.modules.classfile package supports direct access to a Java Virtual Machine classfile contents.
The ClassFile library is an API to read Java classfiles, as described by
The Java Virtual Machine Specification. Given a file or stream reference to a Java
classfile, the API provides read-only access to all of its class attributes, including
type information, methods and fields, generics support (if any), etc.
NOTE: this library is not really a NetBeans module, in that it doesn't have any NetBeans references. It therefore has nothing pluggable, no NetBeans Lookups, and is not extensible.
Java 7 added a several new constant pool entry types to support the invokeDynamic instruction. These need to be modeled by the library.
Java 6 added a new classfile verifier, which uses the new code attribute, StackMapTable. This adds support for that attribute.
Java 5 added several attributes to the JVM classfile format to support generics, annotations, varargs, and enums. The classfile module was enhanced to add access to all of these new attributes.
The normal usecase is for a client wanting to inspect a classfile. A
instance is created with either a
InputStream instance. All attributes of the classfile are available as properties,
The sources for the module are in the NetBeans Mercurial repositories.
Read more about the implementation in the answers to architecture questions.
Built on May 24 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.