Module de.carne.mcd.jvmdecoder
Class ClassConstant
- java.lang.Object
-
- de.carne.mcd.jvmdecoder.classfile.ClassInfoElement
-
- de.carne.mcd.jvmdecoder.classfile.constant.Constant
-
- de.carne.mcd.jvmdecoder.classfile.constant.NameConstant
-
- de.carne.mcd.jvmdecoder.classfile.constant.ClassConstant
-
- All Implemented Interfaces:
Printable
public class ClassConstant extends NameConstant
Class constant.
-
-
Field Summary
Fields Modifier and Type Field Description static byteTAGClass constant tag.-
Fields inherited from class de.carne.mcd.jvmdecoder.classfile.ClassInfoElement
classInfo
-
-
Constructor Summary
Constructors Constructor Description ClassConstant(ClassInfo classInfo, int nameIndex)Constructs a new ClassConstant instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprint(ClassPrinter out, ClassContext context)Prints this instance.@NonNull java.lang.StringresolveSymbol()Resolves the symbol representing this Constant instance.-
Methods inherited from class de.carne.mcd.jvmdecoder.classfile.constant.NameConstant
getName, getNameValue, toString
-
-
-
-
Field Detail
-
TAG
public static final byte TAG
Class constant tag.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ClassConstant
public ClassConstant(ClassInfo classInfo, int nameIndex)
Constructs a new ClassConstant instance.- Parameters:
classInfo- the ClassInfo instance this constant is part of.nameIndex- the class constant name index.
-
-
Method Detail
-
resolveSymbol
public @NonNull java.lang.String resolveSymbol() throws java.io.IOExceptionDescription copied from class:ConstantResolves the symbol representing this Constant instance.- Overrides:
resolveSymbolin classNameConstant- Returns:
- the symbol representing this Constant instance.
- Throws:
java.io.IOException- if the constant cannot be resolved.
-
print
public void print(ClassPrinter out, ClassContext context) throws java.io.IOException
Description copied from interface:PrintablePrints this instance.- Parameters:
out- the ClassPrinter instance to print to.context- the context of this print invocation.- Throws:
java.io.IOException- if an I/O error occurs.
-
-