Package | Description |
---|---|
org.macroing.cel4j.java.binary.classfile |
Provides classes and interfaces that models a ClassFile structure (including substructures).
|
org.macroing.cel4j.java.binary.classfile.attributeinfo |
Provides classes and interfaces that models various attribute_info structures.
|
org.macroing.cel4j.java.binary.classfile.cpinfo |
Provides classes and interfaces that models various cp_info structures.
|
org.macroing.cel4j.java.binary.classfile.string |
Provides classes and interfaces that models various
String representations, such as descriptors and signatures. |
org.macroing.cel4j.java.binary.reader |
Provides classes and interfaces for reading
ClassFile s from binary data. |
org.macroing.cel4j.java.binary.support |
Provides support classes for all Java Binary APIs.
|
org.macroing.cel4j.java.binary.support.xml |
Provides a support API that lets you write and read
ClassFile s to and from XML-files. |
Modifier and Type | Method and Description |
---|---|
ClassFile |
ClassFile.copy()
Returns a copy of this
ClassFile instance. |
static ClassFile |
ClassFile.newInstance()
Returns a new empty
ClassFile instance. |
Modifier and Type | Method and Description |
---|---|
static java.util.Optional<InnerClassesAttribute> |
InnerClassesAttribute.find(ClassFile classFile)
Attempts to find an
InnerClassesAttribute instance in classFile . |
static java.util.Optional<SignatureAttribute> |
SignatureAttribute.find(ClassFile classFile)
Attempts to find a
SignatureAttribute instance in classFile . |
Modifier and Type | Method and Description |
---|---|
static ConstantUTF8Info |
ConstantUTF8Info.findByAttributeNameIndex(AttributeInfo attributeInfo,
ClassFile classFile)
Returns the
ConstantUTF8Info that is located on the index attributeInfo.getAttributeNameIndex() in the constant_pool table of classFile . |
static ConstantUTF8Info |
ConstantUTF8Info.findByAttributeNameIndex(AttributeInfo attributeInfo,
ClassFile classFile,
FieldInfo fieldInfo)
Returns the
ConstantUTF8Info that is located on the index attributeInfo.getAttributeNameIndex() in the constant_pool table of classFile . |
static ConstantUTF8Info |
ConstantUTF8Info.findByAttributeNameIndex(AttributeInfo attributeInfo,
ClassFile classFile,
MethodInfo methodInfo)
Returns the
ConstantUTF8Info that is located on the index attributeInfo.getAttributeNameIndex() in the constant_pool table of classFile . |
static ConstantUTF8Info |
ConstantUTF8Info.findByDescriptorIndex(ClassFile classFile,
FieldInfo fieldInfo)
Returns the
ConstantUTF8Info that is located on the index fieldInfo.getDescriptorIndex() in the constant_pool table of classFile . |
static ConstantUTF8Info |
ConstantUTF8Info.findByDescriptorIndex(ClassFile classFile,
MethodInfo methodInfo)
Returns the
ConstantUTF8Info that is located on the index methodInfo.getDescriptorIndex() in the constant_pool table of classFile . |
static ConstantUTF8Info |
ConstantUTF8Info.findByNameIndex(ClassFile classFile,
FieldInfo fieldInfo)
Returns the
ConstantUTF8Info that is located on the index fieldInfo.getNameIndex() in the constant_pool table of classFile . |
static ConstantUTF8Info |
ConstantUTF8Info.findByNameIndex(ClassFile classFile,
MethodInfo methodInfo)
Returns the
ConstantUTF8Info that is located on the index methodInfo.getNameIndex() in the constant_pool table of classFile . |
static ConstantUTF8Info |
ConstantUTF8Info.findByStringIndex(ClassFile classFile,
ConstantStringInfo constantStringInfo)
Returns the
ConstantUTF8Info that is located on the index constantStringInfo.getStringIndex() in the constant_pool table of classFile . |
Modifier and Type | Method and Description |
---|---|
static ClassName |
ClassName.parseClassNameSuperClass(ClassFile classFile)
Parses the
String indirectly referred to by classFile.getSuperClass() into a ClassName instance. |
static ClassName |
ClassName.parseClassNameThisClass(ClassFile classFile)
Parses the
String indirectly referred to by classFile.getThisClass() into a ClassName instance. |
static java.util.Optional<ClassSignature> |
ClassSignature.parseClassSignatureOptionally(ClassFile classFile) |
static FieldDescriptor |
FieldDescriptor.parseFieldDescriptor(ClassFile classFile,
FieldInfo fieldInfo) |
static FieldDescriptor |
FieldDescriptor.parseFieldDescriptor(ClassFile classFile,
LocalVariableTableAttribute.LocalVariable localVariable) |
static java.util.List<FieldDescriptor> |
FieldDescriptor.parseFieldDescriptors(ClassFile classFile) |
static FieldSignature |
FieldSignature.parseFieldSignature(ClassFile classFile,
SignatureAttribute signatureAttribute) |
static java.util.Optional<FieldSignature> |
FieldSignature.parseFieldSignatureOptionally(ClassFile classFile,
FieldInfo fieldInfo) |
static MethodDescriptor |
MethodDescriptor.parseMethodDescriptor(ClassFile classFile,
MethodInfo methodInfo) |
static java.util.List<MethodDescriptor> |
MethodDescriptor.parseMethodDescriptors(ClassFile classFile) |
static MethodSignature |
MethodSignature.parseMethodSignature(ClassFile classFile,
SignatureAttribute signatureAttribute) |
static java.util.Optional<MethodSignature> |
MethodSignature.parseMethodSignatureOptionally(ClassFile classFile,
MethodInfo methodInfo) |
static Signature |
Signature.parseSignature(ClassFile classFile,
SignatureAttribute signatureAttribute) |
static java.util.List<Signature> |
Signature.parseSignatures(ClassFile classFile) |
Modifier and Type | Method and Description |
---|---|
ClassFile |
ClassFileReader.readClassFile(java.lang.Class<?> clazz)
Returns a
ClassFile representation of clazz , by reading its binary data. |
ClassFile |
ClassFileReader.readClassFile(java.io.DataInput dataInput)
Returns a
ClassFile , by reading some binary data from dataInput . |
ClassFile |
ClassFileReader.readClassFile(java.io.File file)
Returns a
ClassFile , by reading some binary data given a File . |
ClassFile |
ClassFileReader.readClassFile(java.lang.String className)
Returns a
ClassFile representation of the Class that can be obtained by Class.forName(className) , by reading its binary data. |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
Instructions.decodeGetField(CodeAttribute.Instruction instruction,
ClassFile classFile) |
static java.lang.String |
Instructions.decodeGetStatic(CodeAttribute.Instruction instruction,
ClassFile classFile) |
static java.lang.String |
Instructions.decodeInstanceOf(CodeAttribute.Instruction instruction,
ClassFile classFile) |
static java.lang.String |
Instructions.decodeInvokeInterface(CodeAttribute.Instruction instruction,
ClassFile classFile) |
static java.lang.String |
Instructions.decodeInvokeSpecial(CodeAttribute.Instruction instruction,
ClassFile classFile) |
static java.lang.String |
Instructions.decodeInvokeStatic(CodeAttribute.Instruction instruction,
ClassFile classFile) |
static java.lang.String |
Instructions.decodeInvokeVirtual(CodeAttribute.Instruction instruction,
ClassFile classFile) |
static java.lang.String |
Instructions.decodeNew(CodeAttribute.Instruction instruction,
ClassFile classFile) |
static java.lang.String |
Instructions.decodePutField(CodeAttribute.Instruction instruction,
ClassFile classFile) |
static java.lang.String |
Instructions.decodePutStatic(CodeAttribute.Instruction instruction,
ClassFile classFile) |
static java.lang.String |
ClassFiles.getAttributeInfoName(ClassFile classFile,
AttributeInfo attributeInfo,
CodeAttribute codeAttribute) |
static java.util.List<ConstantUTF8Info> |
ClassFiles.getConstantUTF8InfosReferencedFromConstantClassInfos(ClassFile classFile)
Returns a
List with all ConstantUTF8Info s that are referenced from ConstantClassInfo s in the constant_pool table of classFile . |
static java.util.List<ConstantUTF8Info> |
ClassFiles.getConstantUTF8InfosReferencedFromConstantNameAndTypeInfos(ClassFile classFile)
Returns a
List with all ConstantUTF8Info s that are referenced from ConstantNameAndTypeInfo s in the constant_pool table of classFile . |
static CPInfo |
Instructions.getCPInfoFromLDC(CodeAttribute.Instruction instruction,
ClassFile classFile) |
static CPInfo |
Instructions.getCPInfoFromLDCW(CodeAttribute.Instruction instruction,
ClassFile classFile) |
static java.util.Optional<FieldInfo> |
ClassFiles.getFieldInfoByName(ClassFile classFile,
java.lang.String name)
|
static java.lang.String |
ClassFiles.getInterfaceName(ClassFile classFile,
int index) |
static java.util.Optional<MethodInfo> |
ClassFiles.getMethodInfoByName(ClassFile classFile,
java.lang.String name) |
static boolean |
ClassFiles.isClassName(ClassFile classFile,
ConstantUTF8Info constantUTF8Info)
Returns
true if, and only if, constantUTF8Info refers to the name of classFile , false otherwise. |
static boolean |
ClassFiles.isConstantClassInfoPointingToNameIndex(ClassFile classFile,
int index)
Returns
true if, and only if, at least one ConstantClassInfo in the constant_pool table of classFile has a name_index that points to index , false otherwise. |
static boolean |
ClassFiles.isConstantNameAndTypeInfoPointingToDescriptorIndex(ClassFile classFile,
int index)
Returns
true if, and only if, at least one ConstantNameAndTypeInfo in the constant_pool table of classFile has a descriptor_index that points to index , false otherwise. |
static boolean |
ClassFiles.isFieldDescriptor(ClassFile classFile,
ConstantUTF8Info constantUTF8Info)
Returns
true if, and only if, constantUTF8Info refers to the descriptor of a FieldInfo in classFile , false otherwise. |
static boolean |
ClassFiles.isFieldInfoName(ClassFile classFile,
ConstantUTF8Info constantUTF8Info)
Returns
true if, and only if, constantUTF8Info refers to the name of a FieldInfo in classFile , false otherwise. |
static boolean |
ClassFiles.isMethodDescriptor(ClassFile classFile,
ConstantUTF8Info constantUTF8Info)
Returns
true if, and only if, constantUTF8Info refers to the descriptor of a MethodInfo in classFile , false otherwise. |
static boolean |
ClassFiles.isMethodInfoName(ClassFile classFile,
ConstantUTF8Info constantUTF8Info)
Returns
true if, and only if, constantUTF8Info refers to the name of a MethodInfo in classFile , false otherwise. |
Modifier and Type | Method and Description |
---|---|
ClassFile |
XMLReader.readClassFile(java.io.File file)
Reads a
ClassFile from an XML-file pointed to by file . |
Modifier and Type | Method and Description |
---|---|
void |
XMLWriter.writeClassFile(ClassFile classFile,
java.io.File file)
Writes an XML-file based on
classFile to the file represented by file . |