harpoon.IR.RawClass
Class ConstantUtf8
java.lang.Object
harpoon.IR.RawClass.Constant
harpoon.IR.RawClass.ConstantUtf8
public class ConstantUtf8
- extends Constant
The CONSTANT_Utf8_info
structure is used to represent
constant string values.
UTF-8 strings are encoded so that
character sequences that contain only non-null ASCII characters can
be represented using only one byte per character, but characters of
up to 16 bits can be represented.
- Version:
- $Id: ConstantUtf8.java,v 1.2 2002/02/25 21:05:27 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
- See Also:
- "The Java Virtual Machine Specification, section 4.4.7",
Constant
Field Summary |
String |
val
The value of the string constant |
val
public String val
- The value of the string constant
ConstantUtf8
public ConstantUtf8(ClassFile parent,
String val)
- Constructor.
write
public void write(ClassDataOutputStream out)
throws IOException
- Write to a bytecode file.
- Specified by:
write
in class Constant
- Throws:
IOException
- on error writing to output stream.
toString
public String toString()
- Create a human-readable representation of this constant.
- Overrides:
toString
in class Constant