- java.lang.Object
-
- de.carne.mcd.jvmdecoder.classfile.DecodedClassInfo
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intaccessFlags()Gets the class' access flags.java.util.List<Attribute>attributes()Gets the class' attributes.static DecodedClassInfodecode(de.carne.mcd.io.MCDInputBuffer buffer)Decodes the given class file data.java.util.List<FieldInfo>fields()Gets the class' field informations.java.util.List<ClassName>interfaces()Gets the class' super interfaces.intmajorVersion()Gets the class file's major version.java.util.List<MethodInfo>methods()Gets the class' method informations.intminorVersion()Gets the class file's minor version.<T extends Constant>
TresolveConstant(int index, java.lang.Class<T> type)Resolves a constant from the class file's constant pool.java.lang.StringresolveRuntimeSymbol(int index)Resolves a run-time constant pool index to it's corresponding symbol.ClassNamesuperClass()Gets the class' super class.ClassNamethisClass()Gets the class' name.
-
-
-
Method Detail
-
decode
public static DecodedClassInfo decode(de.carne.mcd.io.MCDInputBuffer buffer) throws java.io.IOException
Decodes the given class file data.- Parameters:
buffer- the class file data to decode.- Returns:
- the decoded class info.
- Throws:
java.io.IOException- if a decoding failure occurs.
-
majorVersion
public int majorVersion()
Description copied from interface:ClassInfoGets the class file's major version.- Specified by:
majorVersionin interfaceClassInfo- Returns:
- the class file's major version.
-
minorVersion
public int minorVersion()
Description copied from interface:ClassInfoGets the class file's minor version.- Specified by:
minorVersionin interfaceClassInfo- Returns:
- the class file's minor version.
-
resolveConstant
public <T extends Constant> T resolveConstant(int index, java.lang.Class<T> type) throws java.io.IOException
Description copied from interface:ClassInfoResolves a constant from the class file's constant pool.- Specified by:
resolveConstantin interfaceClassInfo- Type Parameters:
T- the actual type of the constant to resolve.- Parameters:
index- the constant pool index to resolve.type- the type of the constant to resolve.- Returns:
- the resolved constant.
- Throws:
java.io.IOException- if the constant cannot be resolved.
-
resolveRuntimeSymbol
public java.lang.String resolveRuntimeSymbol(int index)
Description copied from interface:ClassInfoResolves a run-time constant pool index to it's corresponding symbol.- Specified by:
resolveRuntimeSymbolin interfaceClassInfo- Parameters:
index- the run-time constant pool index to resolve.- Returns:
- the resolved symbol.
-
accessFlags
public int accessFlags()
Description copied from interface:ClassInfoGets the class' access flags.- Specified by:
accessFlagsin interfaceClassInfo- Returns:
- the class' access flags.
-
thisClass
public ClassName thisClass()
Description copied from interface:ClassInfoGets the class' name.
-
superClass
public ClassName superClass()
Description copied from interface:ClassInfoGets the class' super class.- Specified by:
superClassin interfaceClassInfo- Returns:
- the class' super class.
-
interfaces
public java.util.List<ClassName> interfaces()
Description copied from interface:ClassInfoGets the class' super interfaces.- Specified by:
interfacesin interfaceClassInfo- Returns:
- the class' super interfaces.
-
fields
public java.util.List<FieldInfo> fields()
Description copied from interface:ClassInfoGets the class' field informations.
-
methods
public java.util.List<MethodInfo> methods()
Description copied from interface:ClassInfoGets the class' method informations.
-
attributes
public java.util.List<Attribute> attributes()
Description copied from interface:ClassInfoGets the class' attributes.- Specified by:
attributesin interfaceClassInfo- Returns:
- the class' attributes.
-
-