Initialize from another object. this(c.getStringIndex());
this(c.getStringIndex());
Initialize instance from file data.paramfile Input streamthrowIOException this((int)file.readUnsignedShort());
this((int)file.readUnsignedShort());
paramstring_index Index of Constant_Utf8 in constant pool super(Constants.CONSTANT_String); this.string_index = string_index;
super(Constants.CONSTANT_String); this.string_index = string_index;
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.paramv Visitor object v.visitConstantString(this);
v.visitConstantString(this);
Dump constant field reference to file stream in binary format.paramfile Output file streamthrowIOException file.writeByte(tag); file.writeShort(string_index);
file.writeByte(tag); file.writeShort(string_index);
returndereferenced string return (String)getConstantValue(cp);
return (String)getConstantValue(cp);
returnString object Constant c = cp.getConstant(string_index, Constants.CONSTANT_Utf8); return ((ConstantUtf8)c).getBytes();
Constant c = cp.getConstant(string_index, Constants.CONSTANT_Utf8); return ((ConstantUtf8)c).getBytes();
returnIndex in constant pool of the string (ConstantUtf8). return string_index;
return string_index;
paramstring_index. this.string_index = string_index;
this.string_index = string_index;
returnString representation. return super.toString() + "(string_index = " + string_index + ")";
return super.toString() + "(string_index = " + string_index + ")";