Jode 1.90-CVS
Build Aug 6, 2004

net.sf.jode.bytecode
Class ConstantPool

java.lang.Object
  extended bynet.sf.jode.bytecode.ConstantPool
Direct Known Subclasses:
GrowableConstantPool

public class ConstantPool
extends java.lang.Object

This class represent the constant pool. Normally you wont need to touch this class, as ClassInfo already does all the hard work. You will only need it if you want to add your own custom attributes that use the constant pool.

Author:
Jochen Hoenicke

Field Summary
static int CLASS
           
static int DOUBLE
           
static int FIELDREF
           
static int FLOAT
           
static int INTEGER
           
static int INTERFACEMETHODREF
           
static int LONG
           
static int METHODREF
           
static int NAMEANDTYPE
           
static int STRING
           
static int UTF8
           
 
Constructor Summary
ConstantPool()
           
 
Method Summary
 java.lang.String getClassName(int i)
           
 java.lang.String getClassType(int i)
           
 java.lang.Object getConstant(int i)
           
 Reference getRef(int i)
           
 int getTag(int i)
           
 java.lang.String getUTF8(int i)
           
 java.util.Iterator iterateClassNames()
          Iterates through all class entries in the class pool and returns their (dot seperated) class name.
 void read(java.io.DataInputStream stream)
           
 int size()
           
 java.lang.String toString()
           
 java.lang.String toString(int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS

public static final int CLASS
See Also:
Constant Field Values

FIELDREF

public static final int FIELDREF
See Also:
Constant Field Values

METHODREF

public static final int METHODREF
See Also:
Constant Field Values

INTERFACEMETHODREF

public static final int INTERFACEMETHODREF
See Also:
Constant Field Values

STRING

public static final int STRING
See Also:
Constant Field Values

INTEGER

public static final int INTEGER
See Also:
Constant Field Values

FLOAT

public static final int FLOAT
See Also:
Constant Field Values

LONG

public static final int LONG
See Also:
Constant Field Values

DOUBLE

public static final int DOUBLE
See Also:
Constant Field Values

NAMEANDTYPE

public static final int NAMEANDTYPE
See Also:
Constant Field Values

UTF8

public static final int UTF8
See Also:
Constant Field Values
Constructor Detail

ConstantPool

public ConstantPool()
Method Detail

read

public void read(java.io.DataInputStream stream)
          throws java.io.IOException
Throws:
java.io.IOException

getTag

public int getTag(int i)
           throws ClassFormatException
Throws:
ClassFormatException

getUTF8

public java.lang.String getUTF8(int i)
                         throws ClassFormatException
Throws:
ClassFormatException

getRef

public Reference getRef(int i)
                 throws ClassFormatException
Throws:
ClassFormatException

getConstant

public java.lang.Object getConstant(int i)
                             throws ClassFormatException
Throws:
ClassFormatException

getClassType

public java.lang.String getClassType(int i)
                              throws ClassFormatException
Throws:
ClassFormatException

getClassName

public java.lang.String getClassName(int i)
                              throws ClassFormatException
Throws:
ClassFormatException

iterateClassNames

public java.util.Iterator iterateClassNames()
Iterates through all class entries in the class pool and returns their (dot seperated) class name.


toString

public java.lang.String toString(int i)

size

public int size()

toString

public java.lang.String toString()

Jode 1.90-CVS
Build Aug 6, 2004

Copyright © 1998-2004 by Jochen Hoenicke.