|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jdt.internal.compiler.classfmt.ClassFileStruct
org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader
public class ClassFileReader
| 字段摘要 |
|---|
| 从接口 org.eclipse.jdt.internal.compiler.env.IBinaryType 继承的字段 |
|---|
NoField, NoInterface, NoMethod, NoNestedType |
| 从接口 org.eclipse.jdt.internal.compiler.env.IDependent 继承的字段 |
|---|
JAR_FILE_ENTRY_SEPARATOR |
| 构造方法摘要 | |
|---|---|
ClassFileReader(byte[] classFileBytes,
char[] fileName)
|
|
ClassFileReader(byte[] classFileBytes,
char[] fileName,
boolean fullyInitialize)
|
|
| 方法摘要 | |
|---|---|
int |
accessFlags()
Answer the receiver's access flags. |
IBinaryAnnotation[] |
getAnnotations()
Answer the runtime visible and invisible annotations for this type or null if none. |
int[] |
getConstantPoolOffsets()
Answer the int array that corresponds to all the offsets of each entry in the constant pool |
char[] |
getEnclosingMethod()
Answer the enclosing method (including method selector and method descriptor), or null if none. |
char[] |
getEnclosingTypeName()
Answer the resolved name of the enclosing type in the class file format as specified in section 4.2 of the Java 2 VM spec or null if the receiver is a top level type. |
IBinaryField[] |
getFields()
Answer the receiver's this.fields or null if the array is empty. |
char[] |
getFileName()
Answer the file name which defines the type. |
char[] |
getGenericSignature()
Answer the receiver's signature which describes the parameter & return types as specified in section 4.4.4 of the Java 2 VM spec 3rd edition. |
char[] |
getInnerSourceName()
Answer the source name if the receiver is a inner type. |
char[][] |
getInterfaceNames()
Answer the resolved names of the receiver's interfaces in the class file format as specified in section 4.2 of the Java 2 VM spec or null if the array is empty. |
IBinaryNestedType[] |
getMemberTypes()
Answer the receiver's nested types or null if the array is empty. |
IBinaryMethod[] |
getMethods()
Answer the receiver's this.methods or null if the array is empty. |
char[][][] |
getMissingTypeNames()
Answer the list of missing type names which were referenced from the problem classfile. |
int |
getModifiers()
Answer an int whose bits are set according the access constants defined by the VM spec. |
char[] |
getName()
Answer the resolved name of the type in the class file format as specified in section 4.2 of the Java 2 VM spec. |
char[] |
getSourceName()
Answer the simple name of the type in the class file. |
char[] |
getSuperclassName()
Answer the resolved name of the receiver's superclass in the class file format as specified in section 4.2 of the Java 2 VM spec or null if it does not have one. |
long |
getTagBits()
Answer the tagbits set according to the bits for annotations. |
long |
getVersion()
Answer the major/minor version defined in this class file according to the VM spec. |
boolean |
hasStructuralChanges(byte[] newBytes)
Check if the receiver has structural changes compare to the byte array in argument. |
boolean |
hasStructuralChanges(byte[] newBytes,
boolean orderRequired,
boolean excludesSynthetic)
Check if the receiver has structural changes compare to the byte array in argument. |
boolean |
isAnonymous()
Answer true if the receiver is an anonymous type, false otherwise |
boolean |
isBinaryType()
Answer whether the receiver contains the resolved binary form or the unresolved source form of the type. |
boolean |
isLocal()
Answer true if the receiver is a local type, false otherwise |
boolean |
isMember()
Answer true if the receiver is a member type, false otherwise |
boolean |
isNestedType()
Answer true if the receiver is a nested type, false otherwise |
static ClassFileReader |
read(File file)
|
static ClassFileReader |
read(File file,
boolean fullyInitialize)
|
static ClassFileReader |
read(InputStream stream,
String fileName)
|
static ClassFileReader |
read(InputStream stream,
String fileName,
boolean fullyInitialize)
|
static ClassFileReader |
read(String fileName)
|
static ClassFileReader |
read(String fileName,
boolean fullyInitialize)
|
static ClassFileReader |
read(ZipFile zip,
String filename)
|
static ClassFileReader |
read(ZipFile zip,
String filename,
boolean fullyInitialize)
|
char[] |
sourceFileName()
Answer the source file name attribute. |
String |
toString()
|
| 从类 org.eclipse.jdt.internal.compiler.classfmt.ClassFileStruct 继承的方法 |
|---|
doubleAt, floatAt, i4At, i8At, reset, u1At, u2At, u4At, utf8At |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public ClassFileReader(byte[] classFileBytes,
char[] fileName)
throws ClassFormatException
classFileBytes - Actual bytes of a .class filefileName - Actual name of the file that contains the bytes, can be null
ClassFormatException
public ClassFileReader(byte[] classFileBytes,
char[] fileName,
boolean fullyInitialize)
throws ClassFormatException
classFileBytes - byte[]
Actual bytes of a .class filefileName - char[]
Actual name of the file that contains the bytes, can be nullfullyInitialize - boolean
Flag to fully initialize the new object
ClassFormatException| 方法详细信息 |
|---|
public static ClassFileReader read(File file)
throws ClassFormatException,
IOException
ClassFormatException
IOException
public static ClassFileReader read(File file,
boolean fullyInitialize)
throws ClassFormatException,
IOException
ClassFormatException
IOException
public static ClassFileReader read(InputStream stream,
String fileName)
throws ClassFormatException,
IOException
ClassFormatException
IOException
public static ClassFileReader read(InputStream stream,
String fileName,
boolean fullyInitialize)
throws ClassFormatException,
IOException
ClassFormatException
IOException
public static ClassFileReader read(ZipFile zip,
String filename)
throws ClassFormatException,
IOException
ClassFormatException
IOException
public static ClassFileReader read(ZipFile zip,
String filename,
boolean fullyInitialize)
throws ClassFormatException,
IOException
ClassFormatException
IOException
public static ClassFileReader read(String fileName)
throws ClassFormatException,
IOException
ClassFormatException
IOException
public static ClassFileReader read(String fileName,
boolean fullyInitialize)
throws ClassFormatException,
IOException
ClassFormatException
IOExceptionpublic int accessFlags()
public IBinaryAnnotation[] getAnnotations()
IBinaryType 复制的描述
IBinaryType 中的 getAnnotationspublic int[] getConstantPoolOffsets()
public char[] getEnclosingMethod()
IBinaryType 复制的描述
IBinaryType 中的 getEnclosingMethodpublic char[] getEnclosingTypeName()
IBinaryType 复制的描述
IBinaryType 中的 getEnclosingTypeNamepublic IBinaryField[] getFields()
IBinaryType 中的 getFieldspublic char[] getFileName()
IDependent 复制的描述
IDependent 中的 getFileNameIDependent.getFileName()public char[] getGenericSignature()
IBinaryType 复制的描述
IBinaryType 中的 getGenericSignaturepublic char[] getInnerSourceName()
public char[][] getInterfaceNames()
IBinaryType 中的 getInterfaceNamespublic IBinaryNestedType[] getMemberTypes()
IBinaryType 中的 getMemberTypespublic IBinaryMethod[] getMethods()
IBinaryType 中的 getMethodspublic char[][][] getMissingTypeNames()
IBinaryType 复制的描述
IBinaryType 中的 getMissingTypeNamespublic int getModifiers()
IGenericType 中的 getModifierspublic char[] getName()
IBinaryType 中的 getNamepublic char[] getSourceName()
IBinaryType 复制的描述
IBinaryType 中的 getSourceNamepublic char[] getSuperclassName()
IBinaryType 中的 getSuperclassNamepublic long getTagBits()
IBinaryType 复制的描述
IBinaryType 中的 getTagBitspublic long getVersion()
public boolean hasStructuralChanges(byte[] newBytes)
newBytes - the bytes of the .class file we want to compare the receiver to
public boolean hasStructuralChanges(byte[] newBytes,
boolean orderRequired,
boolean excludesSynthetic)
newBytes - the bytes of the .class file we want to compare the receiver toorderRequired - a boolean indicating whether the members should be sorted or notexcludesSynthetic - a boolean indicating whether the synthetic members should be used in the comparison
public boolean isAnonymous()
IBinaryType 中的 isAnonymousbooleanpublic boolean isBinaryType()
IGenericType 中的 isBinaryTypepublic boolean isLocal()
IBinaryType 中的 isLocalbooleanpublic boolean isMember()
IBinaryType 中的 isMemberbooleanpublic boolean isNestedType()
booleanpublic char[] sourceFileName()
IBinaryType 中的 sourceFileNamepublic String toString()
Object 中的 toString
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||