Class ClassFileReader
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileStruct
org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileReader
- All Implemented Interfaces:
IClassFileReader
-
Field Summary
Fields inherited from interface org.aspectj.org.eclipse.jdt.core.util.IClassFileReader
ALL, ALL_BUT_METHOD_BODIES, CLASSFILE_ATTRIBUTES, CONSTANT_POOL, FIELD_INFOS, METHOD_BODIES, METHOD_INFOS, SUPER_INTERFACES -
Constructor Summary
ConstructorsConstructorDescriptionClassFileReader(byte[] classFileBytes, int decodingFlags) Constructor for ClassFileReader. -
Method Summary
Modifier and TypeMethodDescriptionintAnswer back the access flags of the .class file.intAnswer back the attribute number of the .class file.Answer back the collection of all attributes of the field info.intAnswer back the index of the class name in the constant pool of the .class file.char[]Answer back the qualified name of the .class file.Answer the constant pool of this .class file.Answer back the array of field infos of the .class file, an empty array if none.intAnswer back the number of field infos.Answer back the inner classes attribute of this .class file, null if none.int[]Answer back the indexes in the constant pool of interfaces implemented by this .class file, an empty array if none.char[][]Answer back the names of interfaces implemented by this .class file, an empty array if none.intgetMagic()Answer back the magic number.intAnswer the major version of this .class file.Answer back the array of method infos of this .class file, an empty array if none.intAnswer back the number of method infos.intAnswer the minor version of this .class file.Answer back the nest members attribute of this .class file, null if none.Answer back the permitted subclasses attribute of this .class file, null if none.Answer back the record attribute of this .class file, null if none.Answer the source file attribute, if it exists, null otherwise.intAnswer back the index of the superclass name in the constant pool of the .class file.char[]Answer back the qualified name of the superclass of this .class file.booleanisClass()Answer true if this .class file represents a class, false otherwise.booleanAnswer true if this .class file represents an interface, false otherwise.
-
Constructor Details
-
ClassFileReader
Constructor for ClassFileReader.- Parameters:
classFileBytes- the raw bytes of the .class filedecodingFlags- the decoding flags- Throws:
ClassFormatException- See Also:
-
-
Method Details
-
getAccessFlags
public int getAccessFlags()Description copied from interface:IClassFileReaderAnswer back the access flags of the .class file.- Specified by:
getAccessFlagsin interfaceIClassFileReader- Returns:
- the access flags of the .class file
- See Also:
-
getAttributeCount
public int getAttributeCount()Description copied from interface:IClassFileReaderAnswer back the attribute number of the .class file.- Specified by:
getAttributeCountin interfaceIClassFileReader- Returns:
- the attribute number of the .class file
- See Also:
-
getAttributes
Description copied from interface:IClassFileReaderAnswer back the collection of all attributes of the field info. It includes SyntheticAttribute, ConstantValueAttributes, etc. Answers an empty array if none.- Specified by:
getAttributesin interfaceIClassFileReader- Returns:
- the collection of all attributes of the field info. It includes SyntheticAttribute, ConstantValueAttributes, etc. Answers an empty array if none
- See Also:
-
getClassIndex
public int getClassIndex()Description copied from interface:IClassFileReaderAnswer back the index of the class name in the constant pool of the .class file.- Specified by:
getClassIndexin interfaceIClassFileReader- Returns:
- the index of the class name in the constant pool
- See Also:
-
getClassName
public char[] getClassName()Description copied from interface:IClassFileReaderAnswer back the qualified name of the .class file. The name is returned as described in the JVM specifications.- Specified by:
getClassNamein interfaceIClassFileReader- Returns:
- the qualified name of the .class file
- See Also:
-
getConstantPool
Description copied from interface:IClassFileReaderAnswer the constant pool of this .class file.- Specified by:
getConstantPoolin interfaceIClassFileReader- Returns:
- the constant pool of this .class file
- See Also:
-
getFieldInfos
Description copied from interface:IClassFileReaderAnswer back the array of field infos of the .class file, an empty array if none.- Specified by:
getFieldInfosin interfaceIClassFileReader- Returns:
- the array of field infos of the .class file, an empty array if none
- See Also:
-
getFieldsCount
public int getFieldsCount()Description copied from interface:IClassFileReaderAnswer back the number of field infos.- Specified by:
getFieldsCountin interfaceIClassFileReader- Returns:
- the number of field infos
- See Also:
-
getInnerClassesAttribute
Description copied from interface:IClassFileReaderAnswer back the inner classes attribute of this .class file, null if none.- Specified by:
getInnerClassesAttributein interfaceIClassFileReader- Returns:
- the inner classes attribute of this .class file, null if none
- See Also:
-
getNestMembersAttribute
Description copied from interface:IClassFileReaderAnswer back the nest members attribute of this .class file, null if none.- Specified by:
getNestMembersAttributein interfaceIClassFileReader- Returns:
- the nest members attribute of this .class file, null if none
-
getPermittedSubclassesAttribute
Description copied from interface:IClassFileReaderAnswer back the permitted subclasses attribute of this .class file, null if none.- Specified by:
getPermittedSubclassesAttributein interfaceIClassFileReader- Returns:
- the permitted subclasses attribute of this .class file, null if none
-
getInterfaceIndexes
public int[] getInterfaceIndexes()Description copied from interface:IClassFileReaderAnswer back the indexes in the constant pool of interfaces implemented by this .class file, an empty array if none.- Specified by:
getInterfaceIndexesin interfaceIClassFileReader- Returns:
- the indexes in the constant pool of interfaces implemented by this .class file, an empty array if none
- See Also:
-
getInterfaceNames
public char[][] getInterfaceNames()Description copied from interface:IClassFileReaderAnswer 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.- Specified by:
getInterfaceNamesin interfaceIClassFileReader- Returns:
- the names of interfaces implemented by this .class file, an empty array if none
- See Also:
-
getMagic
public int getMagic()Description copied from interface:IClassFileReaderAnswer back the magic number.- Specified by:
getMagicin interfaceIClassFileReader- Returns:
- the magic number
- See Also:
-
getMajorVersion
public int getMajorVersion()Description copied from interface:IClassFileReaderAnswer the major version of this .class file.- Specified by:
getMajorVersionin interfaceIClassFileReader- Returns:
- the major version of this .class file
- See Also:
-
getMethodInfos
Description copied from interface:IClassFileReaderAnswer back the array of method infos of this .class file, an empty array if none.- Specified by:
getMethodInfosin interfaceIClassFileReader- Returns:
- the array of method infos of this .class file, an empty array if none
- See Also:
-
getMethodsCount
public int getMethodsCount()Description copied from interface:IClassFileReaderAnswer back the number of method infos.- Specified by:
getMethodsCountin interfaceIClassFileReader- Returns:
- the number of method infos
- See Also:
-
getMinorVersion
public int getMinorVersion()Description copied from interface:IClassFileReaderAnswer the minor version of this .class file.- Specified by:
getMinorVersionin interfaceIClassFileReader- Returns:
- the minor version of this .class file
- See Also:
-
getSourceFileAttribute
Description copied from interface:IClassFileReaderAnswer the source file attribute, if it exists, null otherwise.- Specified by:
getSourceFileAttributein interfaceIClassFileReader- Returns:
- the source file attribute, if it exists, null otherwise
- See Also:
-
getSuperclassIndex
public int getSuperclassIndex()Description copied from interface:IClassFileReaderAnswer 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.- Specified by:
getSuperclassIndexin interfaceIClassFileReader- Returns:
- the index of the superclass name in the constant pool of the .class file, 0 if this .class file represents java.lang.Object.
- See Also:
-
getSuperclassName
public char[] getSuperclassName()Description copied from interface:IClassFileReaderAnswer 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.- Specified by:
getSuperclassNamein interfaceIClassFileReader- Returns:
- the qualified name of the superclass of this .class file, null if getSuperclassIndex() is zero
- See Also:
-
isClass
public boolean isClass()Description copied from interface:IClassFileReaderAnswer true if this .class file represents a class, false otherwise.- Specified by:
isClassin interfaceIClassFileReader- Returns:
- true if this .class file represents a class, false otherwise
- See Also:
-
isInterface
public boolean isInterface()Description copied from interface:IClassFileReaderAnswer true if this .class file represents an interface, false otherwise.- Specified by:
isInterfacein interfaceIClassFileReader- Returns:
- true if this .class file represents an interface, false otherwise
- See Also:
-
getRecordAttribute
Description copied from interface:IClassFileReaderAnswer back the record attribute of this .class file, null if none.- Specified by:
getRecordAttributein interfaceIClassFileReader- Returns:
- the nest record of this .class file, null if none
-