Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.taskdefs.optional.depend.constantpool
Class ConstantPoolEntry

    java.lang.Object
      |
      +--org.apache.tools.ant.taskdefs.optional.depend.constantpool.ConstantPoolEntry

Direct Known Subclasses:
  ClassCPInfo, ConstantCPInfo, FieldRefCPInfo, InterfaceMethodRefCPInfo, MethodRefCPInfo, NameAndTypeCPInfo, Utf8CPInfo

public abstract class ConstantPoolEntry
extends java.lang.Object

An entry in the constant pool. This class contains a represenation of the constant pool entries. It is an abstract base class for all the different forms of constant pool entry.

Author:
  Conor MacNeill
See Also:
  `ConstantPool`

Field Summary
`static int` | `CONSTANT_Class` Tag value for Class entries.
`static int` | `CONSTANT_Double` Tag value for Double entries.
`static int` | `CONSTANT_FieldRef` Tag value for Field Reference entries.
`static int` | `CONSTANT_Float` Tag value for Float entries.
`static int` | `CONSTANT_Integer` Tag value for Integer entries.
`static int` | `CONSTANT_InterfaceMethodRef` Tag value for Interface Method Reference entries.
`static int` | `CONSTANT_Long` Tag value for Long entries.
`static int` | `CONSTANT_MethodRef` Tag value for Method Reference entries.
`static int` | `CONSTANT_NameAndType` Tag value for Name and Type entries.
`static int` | `CONSTANT_String` Tag value for String entries.
`static int` | `CONSTANT_Utf8` Tag value for UTF8 entries.

Constructor Summary
`ConstantPoolEntry(int tagValue, int entries)` Initialse the constant pool entry.

Method Summary
`int` | `getNumEntries()` Get the number of Constant Pool Entry slots within the constant pool occupied by this entry.
`int` | `getTag()` Get the Entry's type tag.
`boolean` | `isResolved()` Indicates whether this entry has been resolved.
`abstract void` | `read(java.io.DataInputStream cpStream)` read a constant pool entry from a class stream.
`static ConstantPoolEntry` | `readEntry(java.io.DataInputStream cpStream)` Read a constant pool entry from a stream.
`void` | `resolve(ConstantPool constantPool)` Resolve this constant pool entry with respect to its dependents in the constant pool.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CONSTANT_Utf8

    public static final int CONSTANT_Utf8

  Tag value for UTF8 entries.

### CONSTANT_Integer

    public static final int CONSTANT_Integer

  Tag value for Integer entries.

### CONSTANT_Float

    public static final int CONSTANT_Float

  Tag value for Float entries.

### CONSTANT_Long

    public static final int CONSTANT_Long

  Tag value for Long entries.

### CONSTANT_Double

    public static final int CONSTANT_Double

  Tag value for Double entries.

### CONSTANT_Class

    public static final int CONSTANT_Class

  Tag value for Class entries.

### CONSTANT_String

    public static final int CONSTANT_String

  Tag value for String entries.

### CONSTANT_FieldRef

    public static final int CONSTANT_FieldRef

  Tag value for Field Reference entries.

### CONSTANT_MethodRef

    public static final int CONSTANT_MethodRef

  Tag value for Method Reference entries.

### CONSTANT_InterfaceMethodRef

    public static final int CONSTANT_InterfaceMethodRef

  Tag value for Interface Method Reference entries.

### CONSTANT_NameAndType

    public static final int CONSTANT_NameAndType

  Tag value for Name and Type entries.

Constructor Detail

### ConstantPoolEntry

    public ConstantPoolEntry(int tagValue,
                             int entries)

  Initialse the constant pool entry.
  Parameters:
    `tagValue` - the tag value which identifies which type of constant pool entry this is.
    `entries` - the number of constant pool entry slots this entry occupies.

Method Detail

### readEntry

    public static ConstantPoolEntry readEntry(java.io.DataInputStream cpStream)
                                       throws java.io.IOException

  Read a constant pool entry from a stream. This is a factory method which reads a constant pool entry form a stream and returns the appropriate subclass for the entry.
  Parameters:
    `cpStream` - the stream from which the constant pool entry is to be read.
  Throws:
    `IOExcception` - if there is a problem reading the entry from the stream.

### isResolved

    public boolean isResolved()

  Indicates whether this entry has been resolved. In general a constant pool entry can reference another constant pool entry by its index value. Resolution involves replacing this index value with the constant pool entry at that index.
  Returns:
    true if this entry has been resolved.

### resolve

    public void resolve(ConstantPool constantPool)

  Resolve this constant pool entry with respect to its dependents in the constant pool.
  Parameters:
    `constantPool` - the constant pool of which this entry is a member and against which this entry is to be resolved.

### read

    public abstract void read(java.io.DataInputStream cpStream)
                       throws java.io.IOException

  read a constant pool entry from a class stream.
  Parameters:
    `cpStream` - the DataInputStream which contains the constant pool entry to be read.
  Throws:
    `java.io.IOException` - if there is a problem reading the entry from the stream.

### getTag

    public int getTag()

  Get the Entry's type tag.
  Returns:
    The Tag value of this entry

### getNumEntries

    public final int getNumEntries()

  Get the number of Constant Pool Entry slots within the constant pool occupied by this entry.
  Returns:
    the number of slots used.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache Software Foundation. All Rights Reserved.