Methods Summary |
---|
public void | decReference()
references--;
str.decReference();
|
public boolean | equals(java.lang.Object o)
if (o instanceof StringConstant) {
StringConstant s = (StringConstant) o;
return str.string.equals(s.str.string);
} else {
return false;
}
|
public void | externalize(ConstantPool p)
str = (UnicodeConstant)p.add( str );
|
public int | hashCode()
return tag + str.string.hashCode();
|
public void | incReference()
references++;
str.incReference();
|
public boolean | isResolved() return true;
|
public static ConstantObject | read(int t, java.io.DataInput i)
return new StringConstant( t, i.readUnsignedShort() );
|
public void | resolve(ConstantObject[] table)
if (resolved) return;
str = (UnicodeConstant)table[strIndex];
resolved = true;
|
public java.lang.String | toString()
return "String: "+ ((resolved)?str.string:("[ "+strIndex+" ]"));
|
public void | write(java.io.DataOutput o)
o.writeByte( tag );
if ( resolved ){
o.writeShort( str.index );
} else {
throw new DataFormatException("unresolved StringConstant");
//o.writeShort( strIndex );
}
|