All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class harpoon.ClassFile.Raw.Constant.ConstantString

java.lang.Object
   |
   +----harpoon.ClassFile.Raw.Constant.Constant
           |
           +----harpoon.ClassFile.Raw.Constant.ConstantValue
                   |
                   +----harpoon.ClassFile.Raw.Constant.ConstantString

public class ConstantString
extends ConstantValue
The CONSTANT_String_info structure is used to represent constant objects of the type java.lang.String.

Version:
$Id: ConstantString.java,v 1.13 1998/10/11 03:01:15 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Constant

Variable Index

 o string_index
The value of the string_index item must be a valid index into the constant_pool table.

Constructor Index

 o ConstantString(ClassFile, int)
Constructor.

Method Index

 o string()
 o string_index()
 o toString()
Create a human-readable representation of this constant.
 o value()
Returns the value of this constant, wrapped as a java.lang.String.
 o write(ClassDataOutputStream)
Write to a bytecode file.

Variables

 o string_index
 public int string_index
The value of the string_index item must be a valid index into the constant_pool table. The constant_pool entry at that point must be a CONSTANT_Utf8_info representing the sequence of characters to which the java.lang.String object is to be initialized.

Constructors

 o ConstantString
 public ConstantString(ClassFile parent,
                       int string_index)
Constructor.

Methods

 o write
 public void write(ClassDataOutputStream out) throws IOException
Write to a bytecode file.

Overrides:
write in class Constant
 o string_index
 public ConstantUtf8 string_index()
 o string
 public String string()
 o value
 public Object value()
Returns the value of this constant, wrapped as a java.lang.String.

Overrides:
value in class ConstantValue
 o toString
 public String toString()
Create a human-readable representation of this constant.

Overrides:
toString in class Constant

All Packages  Class Hierarchy  This Package  Previous  Next  Index