Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

CONSTANT_Utf8_info Class Reference

Inheritance diagram for CONSTANT_Utf8_info:
[legend]
Collaboration diagram for CONSTANT_Utf8_info:
[legend]
List of all members.

Public Methods

int compareTo (cp_info constant_pool[], cp_info cp, cp_info cp_constant_pool[])
int compareTo (cp_info cp)
String convert ()
boolean equals (CONSTANT_Utf8_info cu)
int length ()
int size ()
String toString (cp_info constant_pool[])
String typeName ()

Static Public Methods

byte[] toUtf8 (String s)

Public Attributes

byte bytes []

Private Attributes

String s

Static Private Attributes

Utf8_Enumeration e1 = new Utf8_Enumeration()
Utf8_Enumeration e2 = new Utf8_Enumeration()

Detailed Description

A constant pool entry of type CONSTANT_Utf8; note this is not multithread safe.
See also:
cp_info
Author:
Clark Verbrugge

Definition at line 117 of file CONSTANT_Utf8_info.java.


Member Function Documentation

int CONSTANT_Utf8_info::compareTo cp_info   cp [inline]
 

Compares this entry with another cp_info object; note that for Utf8 object it really doesn't matter whether they're in the same or a different constant pool, since they really do carry all their data.

Parameters:
cp   constant pool entry to compare against.
Returns:
a value <0, 0, or >0 indicating whether this is smaller, the same or larger than cp.
See also:
cp_info::compareTo , CONSTANT_Utf8_info::compareTo(cp_info[],cp_info,cp_info[])

Definition at line 147 of file CONSTANT_Utf8_info.java.

int CONSTANT_Utf8_info::compareTo cp_info   constant_pool[],
cp_info   cp,
cp_info   cp_constant_pool[]
[inline, virtual]
 

Compares this entry with another cp_info object (which may reside in a different constant pool).

Parameters:
constant_pool   constant pool of ClassFile for this.
cp   constant pool entry to compare against.
cp_constant_pool   constant pool of ClassFile for cp.
Returns:
a value <0, 0, or >0 indicating whether this is smaller, the same or larger than cp.
See also:
cp_info::compareTo , CONSTANT_Utf8_info::compareTo(cp_info)

Reimplemented from cp_info.

Definition at line 135 of file CONSTANT_Utf8_info.java.

String CONSTANT_Utf8_info::convert   [inline]
 

Converts internal representation into an actual String.

Returns:
String version of this utf8 object.

Definition at line 165 of file CONSTANT_Utf8_info.java.

Referenced by ClassFile::listFields(), field_info::prototype(), ClassFile::readConstantPool(), method_info::toName(), field_info::toName(), CONSTANT_String_info::toString(), CONSTANT_NameAndType_info::toString(), and CONSTANT_Class_info::toString().

boolean CONSTANT_Utf8_info::equals CONSTANT_Utf8_info   cu [inline]
 

Answers whether this utf8 string is the same as a given one.

Parameters:
cu   utf8 object with which to compare.
Returns:
true if they are equal, false if they are not.

Definition at line 181 of file CONSTANT_Utf8_info.java.

int CONSTANT_Utf8_info::length   [inline]
 

Length in bytes of byte array.

Definition at line 191 of file CONSTANT_Utf8_info.java.

int CONSTANT_Utf8_info::size   [inline, virtual]
 

Returns the size of this cp_info object.

Returns:
number of bytes occupied by this object.
See also:
cp_info::size

Reimplemented from cp_info.

Definition at line 198 of file CONSTANT_Utf8_info.java.

String CONSTANT_Utf8_info::toString cp_info   constant_pool[] [inline, virtual]
 

Returns a String representation of this entry.

Parameters:
constant_pool   constant pool of ClassFile.
Returns:
String representation of this entry.
See also:
cp_info::toString

Reimplemented from cp_info.

Definition at line 204 of file CONSTANT_Utf8_info.java.

byte [] CONSTANT_Utf8_info::toUtf8 String   s [inline, static]
 

Utility method; converts the given String into a utf8 encoded array of bytes.

Parameters:
s   String to encode.
Returns:
array of bytes, utf8 encoded version of s.

Definition at line 212 of file CONSTANT_Utf8_info.java.

String CONSTANT_Utf8_info::typeName   [inline, virtual]
 

Returns a String description of what kind of entry this is.

Returns:
the String "utf8".
See also:
cp_info::typeName

Reimplemented from cp_info.

Definition at line 227 of file CONSTANT_Utf8_info.java.


Member Data Documentation

byte CONSTANT_Utf8_info::bytes[]
 

Byte array of actual utf8 string.

Definition at line 124 of file CONSTANT_Utf8_info.java.


The documentation for this class was generated from the following file:
Generated at Thu Feb 7 07:07:10 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001