com.sun.tools.classfile
Class ClassFile
java.lang.Object
com.sun.tools.classfile.ClassFile
public class ClassFile
- extends java.lang.Object
See JVMS3, section 4.2.
This is NOT part of any API supported by Sun Microsystems. If
you write code that depends on this, you do so at your own risk.
This code and its internal interfaces are subject to change or
deletion without notice.
|
Constructor Summary |
ClassFile(java.io.InputStream in,
Attribute.Factory attributeFactory)
|
ClassFile(int magic,
int minor_version,
int major_version,
ConstantPool constant_pool,
AccessFlags access_flags,
int this_class,
int super_class,
int[] interfaces,
Field[] fields,
Method[] methods,
Attributes attributes)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
magic
public final int magic
minor_version
public final int minor_version
major_version
public final int major_version
constant_pool
public final ConstantPool constant_pool
access_flags
public final AccessFlags access_flags
this_class
public final int this_class
super_class
public final int super_class
interfaces
public final int[] interfaces
fields
public final Field[] fields
methods
public final Method[] methods
attributes
public final Attributes attributes
ClassFile
ClassFile(java.io.InputStream in,
Attribute.Factory attributeFactory)
throws java.io.IOException,
ConstantPoolException
- Throws:
java.io.IOException
ConstantPoolException
ClassFile
public ClassFile(int magic,
int minor_version,
int major_version,
ConstantPool constant_pool,
AccessFlags access_flags,
int this_class,
int super_class,
int[] interfaces,
Field[] fields,
Method[] methods,
Attributes attributes)
read
public static ClassFile read(java.io.File file)
throws java.io.IOException,
ConstantPoolException
- Throws:
java.io.IOException
ConstantPoolException
read
public static ClassFile read(java.io.File file,
Attribute.Factory attributeFactory)
throws java.io.IOException,
ConstantPoolException
- Throws:
java.io.IOException
ConstantPoolException
read
public static ClassFile read(java.io.InputStream in)
throws java.io.IOException,
ConstantPoolException
- Throws:
java.io.IOException
ConstantPoolException
read
public static ClassFile read(java.io.InputStream in,
Attribute.Factory attributeFactory)
throws java.io.IOException,
ConstantPoolException
- Throws:
java.io.IOException
ConstantPoolException
getName
public java.lang.String getName()
throws ConstantPoolException
- Throws:
ConstantPoolException
getSuperclassName
public java.lang.String getSuperclassName()
throws ConstantPoolException
- Throws:
ConstantPoolException
getInterfaceName
public java.lang.String getInterfaceName(int i)
throws ConstantPoolException
- Throws:
ConstantPoolException
getAttribute
public Attribute getAttribute(java.lang.String name)
isClass
public boolean isClass()
isInterface
public boolean isInterface()