Initialize from another object. this(c.getNameIndex());
this(c.getNameIndex());
Initialize instance from file data.paramfile Input streamthrowsIOException this(file.readUnsignedShort());
this(file.readUnsignedShort());
paramname_index Name index in constant pool. Should refer to a ConstantUtf8. super(Constants.CONSTANT_Class); this.name_index = name_index;
super(Constants.CONSTANT_Class); this.name_index = name_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.visitConstantClass(this);
v.visitConstantClass(this);
Dump constant class to file stream in binary format.paramfile Output file streamthrowsIOException file.writeByte(tag); file.writeShort(name_index);
file.writeByte(tag); file.writeShort(name_index);
returndereferenced string return (String)getConstantValue(cp);
return (String)getConstantValue(cp);
returnString object Constant c = cp.getConstant(name_index, Constants.CONSTANT_Utf8); return ((ConstantUtf8)c).getBytes();
Constant c = cp.getConstant(name_index, Constants.CONSTANT_Utf8); return ((ConstantUtf8)c).getBytes();
returnName index in constant pool of class name. return name_index;
return name_index;
paramname_index. this.name_index = name_index;
this.name_index = name_index;
returnString representation. return super.toString() + "(name_index = " + name_index + ")";
return super.toString() + "(name_index = " + name_index + ")";