com.sun.enterprise.deployment.annotation.introspection
Class ClassFile
java.lang.Object
com.sun.enterprise.deployment.annotation.introspection.ClassFile
public class ClassFile
- extends java.lang.Object
This class is encapsulating binary .class file information as
defined at
http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html
This is used by the annotation frameworks to quickly scan .class files
for the presence of annotations. This avoid the annotation framework having
to load each .class file in the class loader.
The bytecode to be scanned could come from either a File (which lends itself
easily to a channel) or from a JAR (which works better with a byte array). So
we provide two variants of the containsAnnotation method, one for each.
- Author:
- Jerome Dochez
|
Method Summary |
boolean |
containsAnnotation(byte[] bytecode)
Read the input channel and initialize instance data
structure. |
boolean |
containsAnnotation(java.nio.channels.ReadableByteChannel in,
long size)
Read the input channel and initialize instance data
structure. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
majorVersion
public short majorVersion
minorVersion
public short minorVersion
constantPool
public ConstantPoolInfo[] constantPool
accessFlags
public short accessFlags
thisClass
public ConstantPoolInfo thisClass
superClass
public ConstantPoolInfo superClass
interfaces
public ConstantPoolInfo[] interfaces
ACC_PUBLIC
public static final int ACC_PUBLIC
- See Also:
- Constant Field Values
ACC_PRIVATE
public static final int ACC_PRIVATE
- See Also:
- Constant Field Values
ACC_PROTECTED
public static final int ACC_PROTECTED
- See Also:
- Constant Field Values
ACC_STATIC
public static final int ACC_STATIC
- See Also:
- Constant Field Values
ACC_FINAL
public static final int ACC_FINAL
- See Also:
- Constant Field Values
ACC_SYNCHRONIZED
public static final int ACC_SYNCHRONIZED
- See Also:
- Constant Field Values
ACC_THREADSAFE
public static final int ACC_THREADSAFE
- See Also:
- Constant Field Values
ACC_TRANSIENT
public static final int ACC_TRANSIENT
- See Also:
- Constant Field Values
ACC_NATIVE
public static final int ACC_NATIVE
- See Also:
- Constant Field Values
ACC_INTERFACE
public static final int ACC_INTERFACE
- See Also:
- Constant Field Values
ACC_ABSTRACT
public static final int ACC_ABSTRACT
- See Also:
- Constant Field Values
ClassFile
public ClassFile(ConstantPoolInfo poolInfo)
- Creates a new instance of ClassFile
containsAnnotation
public boolean containsAnnotation(java.nio.channels.ReadableByteChannel in,
long size)
throws java.io.IOException
- Read the input channel and initialize instance data
structure.
- Throws:
java.io.IOException
containsAnnotation
public boolean containsAnnotation(byte[] bytecode)
throws java.io.IOException
- Read the input channel and initialize instance data
structure.
- Throws:
java.io.IOException
Copyright © 2012 GlassFish Community. All Rights Reserved.