Module de.carne.mcd.jvmdecoder
Class StringConstant
- java.lang.Object
-
- de.carne.mcd.jvmdecoder.classfile.ClassInfoElement
-
- de.carne.mcd.jvmdecoder.classfile.constant.Constant
-
- de.carne.mcd.jvmdecoder.classfile.constant.StringConstant
-
-
Field Summary
Fields Modifier and Type Field Description static intTAGString constant tag.-
Fields inherited from class de.carne.mcd.jvmdecoder.classfile.ClassInfoElement
classInfo
-
-
Constructor Summary
Constructors Constructor Description StringConstant(ClassInfo classInfo, int stringIndex)Constructs a new DoubleConstant instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetValue()Gets this constant's value.voidprint(ClassPrinter out, ClassContext context)Prints this instance.@NonNull java.lang.StringresolveSymbol()Resolves the symbol representing this Constant instance.java.lang.StringtoString()
-
-
-
Field Detail
-
TAG
public static final int TAG
String constant tag.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StringConstant
public StringConstant(ClassInfo classInfo, int stringIndex)
Constructs a new DoubleConstant instance.- Parameters:
classInfo- the ClassInfo instance this constant is part of.stringIndex- the constant value index.
-
-
Method Detail
-
getValue
public java.lang.String getValue() throws java.io.IOExceptionGets this constant's value.- Returns:
- this constant's value.
- Throws:
java.io.IOException- if the value 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.
-
resolveSymbol
public @NonNull java.lang.String resolveSymbol() throws java.io.IOExceptionDescription copied from class:ConstantResolves the symbol representing this Constant instance.- Overrides:
resolveSymbolin classConstant- Returns:
- the symbol representing this Constant instance.
- Throws:
java.io.IOException- if the constant cannot be resolved.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-