public class ClassFileReader extends ClassFileStruct implements IClassFileReader
ALL, ALL_BUT_METHOD_BODIES, CLASSFILE_ATTRIBUTES, CONSTANT_POOL, FIELD_INFOS, METHOD_BODIES, METHOD_INFOS, SUPER_INTERFACES| Constructor and Description |
|---|
ClassFileReader(byte[] classFileBytes,
int decodingFlags)
Constructor for ClassFileReader.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAccessFlags()
Answer back the access flags 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.
|
INestMembersAttribute |
getNestMembersAttribute()
Answer back the nest members attribute of this .class file, null if none.
|
IRecordAttribute |
getRecordAttribute()
Answer back the record attribute of this .class file, null if none.
|
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 a class, false otherwise.
|
boolean |
isInterface()
Answer true if this .class file represents an interface, false otherwise.
|
public ClassFileReader(byte[] classFileBytes,
int decodingFlags)
throws ClassFormatException
classFileBytes - the raw bytes of the .class filedecodingFlags - the decoding flagsClassFormatExceptionIClassFileReader.ALL,
IClassFileReader.CLASSFILE_ATTRIBUTES,
IClassFileReader.CONSTANT_POOL,
IClassFileReader.FIELD_INFOSpublic int getAccessFlags()
IClassFileReadergetAccessFlags in interface IClassFileReaderIClassFileReader.getAccessFlags()public int getAttributeCount()
IClassFileReadergetAttributeCount in interface IClassFileReaderIClassFileReader.getAttributeCount()public IClassFileAttribute[] getAttributes()
IClassFileReadergetAttributes in interface IClassFileReaderIClassFileReader.getAttributes()public int getClassIndex()
IClassFileReadergetClassIndex in interface IClassFileReaderIClassFileReader.getClassIndex()public char[] getClassName()
IClassFileReadergetClassName in interface IClassFileReaderIClassFileReader.getClassName()public IConstantPool getConstantPool()
IClassFileReadergetConstantPool in interface IClassFileReaderIClassFileReader.getConstantPool()public IFieldInfo[] getFieldInfos()
IClassFileReadergetFieldInfos in interface IClassFileReaderIClassFileReader.getFieldInfos()public int getFieldsCount()
IClassFileReadergetFieldsCount in interface IClassFileReaderIClassFileReader.getFieldsCount()public IInnerClassesAttribute getInnerClassesAttribute()
IClassFileReadergetInnerClassesAttribute in interface IClassFileReaderIClassFileReader.getInnerClassesAttribute()public INestMembersAttribute getNestMembersAttribute()
IClassFileReadergetNestMembersAttribute in interface IClassFileReaderpublic int[] getInterfaceIndexes()
IClassFileReadergetInterfaceIndexes in interface IClassFileReaderIClassFileReader.getInterfaceIndexes()public char[][] getInterfaceNames()
IClassFileReadergetInterfaceNames in interface IClassFileReaderIClassFileReader.getInterfaceNames()public int getMagic()
IClassFileReadergetMagic in interface IClassFileReaderIClassFileReader.getMagic()public int getMajorVersion()
IClassFileReadergetMajorVersion in interface IClassFileReaderIClassFileReader.getMajorVersion()public IMethodInfo[] getMethodInfos()
IClassFileReadergetMethodInfos in interface IClassFileReaderIClassFileReader.getMethodInfos()public int getMethodsCount()
IClassFileReadergetMethodsCount in interface IClassFileReaderIClassFileReader.getMethodsCount()public int getMinorVersion()
IClassFileReadergetMinorVersion in interface IClassFileReaderIClassFileReader.getMinorVersion()public ISourceAttribute getSourceFileAttribute()
IClassFileReadergetSourceFileAttribute in interface IClassFileReaderIClassFileReader.getSourceFileAttribute()public int getSuperclassIndex()
IClassFileReadergetSuperclassIndex in interface IClassFileReaderIClassFileReader.getSuperclassIndex()public char[] getSuperclassName()
IClassFileReadergetSuperclassName in interface IClassFileReaderIClassFileReader.getSuperclassName()public boolean isClass()
IClassFileReaderisClass in interface IClassFileReaderIClassFileReader.isClass()public boolean isInterface()
IClassFileReaderisInterface in interface IClassFileReaderIClassFileReader.isInterface()public IRecordAttribute getRecordAttribute()
IClassFileReadergetRecordAttribute in interface IClassFileReader