Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse JDT Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jdt.core.util
Interface IClassFileReader

public interface IClassFileReader

Description of a .class file. This class reifies the internal structure of a .class file following the JVM specifications.

Note that several changes were introduced with J2SE 1.5. Class file reader implementations should use support these new class file attributes by returning objects implementing the appropriate specialized attribute interfaces. Class file reader clients can search for these new attributes and downcast to the new interfaces as appropriate.

This interface may be implemented by clients.

Since:
  2.0

Field Summary
`static int` | `ALL` This value should be used to read completely each part of a .class file.
`static int` | `ALL_BUT_METHOD_BODIES` This value should be used to read the whole contents of the .class file except the method bodies.
`static int` | `CLASSFILE_ATTRIBUTES` This value should be used to read the constant pool entries and the attributes of a .class file.
`static int` | `CONSTANT_POOL` This value should be used to read only the constant pool entries of a .class file.
`static int` | `FIELD_INFOS` This value should be used to read the constant pool entries and the field infos of a .class file.
`static int` | `METHOD_BODIES` This value should be used to read the method bodies.
`static int` | `METHOD_INFOS` This value should be used to read the constant pool entries and the method infos of a .class file.
`static int` | `SUPER_INTERFACES` This value should be used to read the constant pool entries and the super interface names of a .class file.

Method Summary
`int` | `getAccessFlags()` Answer back the access flag of the .class file.
`int` | `getAttributeCount()` Answer back the attribute number of the .class file.
`IClassFileAttribute[]` | `getAttributes()` Answer back the collection of all attributes of the field info.
`int` | `getClassIndex()` Answer back the index of the class name in the constant pool of the .class file.
`char[]` | `getClassName()` Answer back the qualified name of the .class file.
`IConstantPool` | `getConstantPool()` Answer the constant pool of this .class file.
`IFieldInfo[]` | `getFieldInfos()` Answer back the array of field infos of the .class file, an empty array if none.
`int` | `getFieldsCount()` Answer back the number of field infos.
`IInnerClassesAttribute` | `getInnerClassesAttribute()` Answer back the inner classes attribute of this .class file, null if none.
`int[]` | `getInterfaceIndexes()` Answer back the indexes in the constant pool of interfaces implemented by this .class file, an empty array if none.
`char[][]` | `getInterfaceNames()` Answer back the names of interfaces implemented by this .class file, an empty array if none.
`int` | `getMagic()` Answer back the magic number.
`int` | `getMajorVersion()` Answer the major version of this .class file.
`IMethodInfo[]` | `getMethodInfos()` Answer back the array of method infos of this .class file, an empty array if none.
`int` | `getMethodsCount()` Answer back the number of method infos.
`int` | `getMinorVersion()` Answer the minor version of this .class file.
`ISourceAttribute` | `getSourceFileAttribute()` Answer the source file attribute, if it exists, null otherwise.
`int` | `getSuperclassIndex()` Answer back the index of the superclass name in the constant pool of the .class file.
`char[]` | `getSuperclassName()` Answer back the qualified name of the superclass of this .class file.
`boolean` | `isClass()` Answer true if this .class file represents an class, false otherwise.
`boolean` | `isInterface()` Answer true if this .class file represents an interface, false otherwise.

Field Detail

### ALL

    public static final int ALL

  This value should be used to read completely each part of a .class file.

  See Also:
    Constant Field Values

### CONSTANT_POOL

    public static final int CONSTANT_POOL

  This value should be used to read only the constant pool entries of a .class file.

  See Also:
    Constant Field Values

### METHOD_INFOS

    public static final int METHOD_INFOS

  This value should be used to read the constant pool entries and the method infos of a .class file.

  See Also:
    Constant Field Values

### FIELD_INFOS

    public static final int FIELD_INFOS

  This value should be used to read the constant pool entries and the field infos of a .class file.

  See Also:
    Constant Field Values

### SUPER_INTERFACES

    public static final int SUPER_INTERFACES

  This value should be used to read the constant pool entries and the super interface names of a .class file.

  See Also:
    Constant Field Values

### CLASSFILE_ATTRIBUTES

    public static final int CLASSFILE_ATTRIBUTES

  This value should be used to read the constant pool entries and the attributes of a .class file.

  See Also:
    Constant Field Values

### METHOD_BODIES

    public static final int METHOD_BODIES

  This value should be used to read the method bodies. It has to be used with METHOD_INFOS.

  See Also:
    Constant Field Values

### ALL_BUT_METHOD_BODIES

    public static final int ALL_BUT_METHOD_BODIES

  This value should be used to read the whole contents of the .class file except the method bodies.

  See Also:
    Constant Field Values

Method Detail

### getAccessFlags

    public int getAccessFlags()

  Answer back the access flag of the .class file.

  Returns:
    the access flag of the .class file

### getFieldInfos

    public IFieldInfo[] getFieldInfos()

  Answer back the array of field infos of the .class file, an empty array if none.

  Returns:
    the array of field infos of the .class file, an empty array if none

### getInterfaceNames

    public char[][] getInterfaceNames()

  Answer back the names of interfaces implemented by this .class file, an empty array if none. The names are returned as described in the JVM specifications.

  Returns:
    the names of interfaces implemented by this .class file, an empty array if none

### getInterfaceIndexes

    public int[] getInterfaceIndexes()

  Answer back the indexes in the constant pool of interfaces implemented by this .class file, an empty array if none.

  Returns:
    the indexes in the constant pool of interfaces implemented by this .class file, an empty array if none

### getInnerClassesAttribute

    public IInnerClassesAttribute getInnerClassesAttribute()

  Answer back the inner classes attribute of this .class file, null if none.

  Returns:
    the inner classes attribute of this .class file, null if none

### getMethodInfos

    public IMethodInfo[] getMethodInfos()

  Answer back the array of method infos of this .class file, an empty array if none.

  Returns:
    the array of method infos of this .class file, an empty array if none

### getClassName

    public char[] getClassName()

  Answer back the qualified name of the .class file. The name is returned as described in the JVM specifications.

  Returns:
    the qualified name of the .class file

### getClassIndex

    public int getClassIndex()

  Answer back the index of the class name in the constant pool of the .class file.

  Returns:
    the index of the class name in the constant pool

### getSuperclassName

    public char[] getSuperclassName()

  Answer back the qualified name of the superclass of this .class file. The name is returned as described in the JVM specifications. Answer null if getSuperclassIndex() is zero.

  Returns:
    the qualified name of the superclass of this .class file, null if getSuperclassIndex() is zero

### getSuperclassIndex

    public int getSuperclassIndex()

  Answer back the index of the superclass name in the constant pool of the .class file. Answer 0 if this .class file represents java.lang.Object.

  Returns:
    the index of the superclass name in the constant pool of the .class file, 0 if this .class file represents java.lang.Object.

### isClass

    public boolean isClass()

  Answer true if this .class file represents an class, false otherwise.

  Returns:
    true if this .class file represents an class, false otherwise

### isInterface

    public boolean isInterface()

  Answer true if this .class file represents an interface, false otherwise.

  Returns:
    true if this .class file represents an interface, false otherwise

### getSourceFileAttribute

    public ISourceAttribute getSourceFileAttribute()

  Answer the source file attribute, if it exists, null otherwise.

  Returns:
    the source file attribute, if it exists, null otherwise

### getConstantPool

    public IConstantPool getConstantPool()

  Answer the constant pool of this .class file.

  Returns:
    the constant pool of this .class file

### getMinorVersion

    public int getMinorVersion()

  Answer the minor version of this .class file.

  Returns:
    the minor version of this .class file

### getMajorVersion

    public int getMajorVersion()

  Answer the major version of this .class file.

  Returns:
    the major version of this .class file

### getAttributeCount

    public int getAttributeCount()

  Answer back the attribute number of the .class file.

  Returns:
    the attribute number of the .class file

### getAttributes

    public IClassFileAttribute[] getAttributes()

  Answer back the collection of all attributes of the field info. It includes SyntheticAttribute, ConstantValueAttributes, etc. Answers an empty array if none.

  Returns:
    the collection of all attributes of the field info. It includes SyntheticAttribute, ConstantValueAttributes, etc. Answers an empty array if none

### getMagic

    public int getMagic()

  Answer back the magic number.

  Returns:
    the magic number

### getFieldsCount

    public int getFieldsCount()

  Answer back the number of field infos.

  Returns:
    the number of field infos

### getMethodsCount

    public int getMethodsCount()

  Answer back the number of method infos.

  Returns:
    the number of method infos

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse JDT Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) IBM Corp. and others 2000, 2004. All Rights Reserved.