public final class ConstantString extends Constant implements ConstantObject
Constant
,
Serialized FormConstructor and Description |
---|
ConstantString(ConstantString c)
Initialize from another object.
|
ConstantString(int string_index) |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely
defined by the contents of a Java class.
|
void |
dump(DataOutputStream file)
Dump constant field reference to file stream in binary format.
|
String |
getBytes(ConstantPool cp) |
Object |
getConstantValue(ConstantPool cp) |
int |
getStringIndex() |
void |
setStringIndex(int string_index) |
String |
toString() |
clone, copy, equals, getComparator, getTag, hashCode, setComparator
public ConstantString(ConstantString c)
public ConstantString(int string_index)
string_index
- Index of Constant_Utf8 in constant poolpublic void accept(Visitor v)
public final void dump(DataOutputStream file) throws IOException
dump
in class Constant
file
- Output file streamIOException
public final int getStringIndex()
public final void setStringIndex(int string_index)
string_index
- the index into the constant of the string valuepublic final String toString()
public Object getConstantValue(ConstantPool cp)
getConstantValue
in interface ConstantObject
public String getBytes(ConstantPool cp)