org.apache.bcel.classfile
public final class ConstantString extends Constant implements ConstantObject
Version: $Id: ConstantString.java 386056 2006-03-15 11:31:56Z tcurdt $
See Also: Constant
| Field Summary | |
|---|---|
| int | string_index |
| Constructor Summary | |
|---|---|
| ConstantString(ConstantString c)
Initialize from another object. | |
| ConstantString(DataInputStream file)
Initialize instance from file data.
| |
| ConstantString(int string_index) | |
| Method Summary | |
|---|---|
| void | accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely
defined by the contents of a Java class. |
| void | dump(DataOutputStream file)
Dump constant field reference to file stream in binary format.
|
| String | getBytes(ConstantPool cp) |
| Object | getConstantValue(ConstantPool cp) |
| int | getStringIndex() |
| void | setStringIndex(int string_index) |
| String | toString() |
Parameters: file Input stream
Throws: IOException
Parameters: string_index Index of Constant_Utf8 in constant pool
Parameters: v Visitor object
Parameters: file Output file stream
Throws: IOException
Returns: dereferenced string
Returns: String object
Returns: Index in constant pool of the string (ConstantUtf8).
Parameters: string_index the index into the constant of the string value
Returns: String representation.