Class ConstantPoolEntry
- java.lang.Object
-
- org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry
-
- org.apache.commons.compress.harmony.unpack200.bytecode.ConstantPoolEntry
-
- Direct Known Subclasses:
CPClass,CPConstant,CPFieldRef,CPNameAndType,CPRef,CPUTF8
public abstract class ConstantPoolEntry extends ClassFileEntry
Abstracts constant pool entries.
-
-
Field Summary
Fields Modifier and Type Field Description static byteCP_ClassThe constant 7 for a constant pool class.static byteCP_DoubleThe constant 6 for a constant pool double.static byteCP_FieldrefThe constant 9 for a constant pool field reference.static byteCP_FloatThe constant 4 for a constant pool float.static byteCP_IntegerThe constant 3 for a constant pool int.static byteCP_InterfaceMethodrefThe constant 11 for a constant pool interface method reference.static byteCP_LongThe constant 5 for a constant pool long.static byteCP_MethodrefThe constant 10 for a constant pool method reference.static byteCP_NameAndTypeThe constant 12 for a constant pool name and type.static byteCP_StringThe constant 8 for a constant pool string.static byteCP_UTF8The constant 1 for a constant pool UTF8.protected intglobalIndexGlobal index.-
Fields inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry
NONE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddoWrite(java.io.DataOutputStream dos)Writes this instance to the output stream.abstract booleanequals(java.lang.Object obj)intgetGlobalIndex()Gets the global index.bytegetTag()Gets the tag.abstract inthashCode()protected abstract voidwriteBody(java.io.DataOutputStream dos)Writes this instance to the given output stream.-
Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry
getNestedClassFileEntries, objectHashCode, resolve, toString, write
-
-
-
-
Field Detail
-
CP_Class
public static final byte CP_Class
The constant 7 for a constant pool class.- See Also:
- Constant Field Values
-
CP_Double
public static final byte CP_Double
The constant 6 for a constant pool double.- See Also:
- Constant Field Values
-
CP_Fieldref
public static final byte CP_Fieldref
The constant 9 for a constant pool field reference.- See Also:
- Constant Field Values
-
CP_Float
public static final byte CP_Float
The constant 4 for a constant pool float.- See Also:
- Constant Field Values
-
CP_Integer
public static final byte CP_Integer
The constant 3 for a constant pool int.- See Also:
- Constant Field Values
-
CP_InterfaceMethodref
public static final byte CP_InterfaceMethodref
The constant 11 for a constant pool interface method reference.- See Also:
- Constant Field Values
-
CP_Long
public static final byte CP_Long
The constant 5 for a constant pool long.- See Also:
- Constant Field Values
-
CP_Methodref
public static final byte CP_Methodref
The constant 10 for a constant pool method reference.- See Also:
- Constant Field Values
-
CP_NameAndType
public static final byte CP_NameAndType
The constant 12 for a constant pool name and type.- See Also:
- Constant Field Values
-
CP_String
public static final byte CP_String
The constant 8 for a constant pool string.- See Also:
- Constant Field Values
-
CP_UTF8
public static final byte CP_UTF8
The constant 1 for a constant pool UTF8.- See Also:
- Constant Field Values
-
globalIndex
protected int globalIndex
Global index.
-
-
Method Detail
-
doWrite
public void doWrite(java.io.DataOutputStream dos) throws java.io.IOException
Description copied from class:ClassFileEntryWrites this instance to the output stream.- Specified by:
doWritein classClassFileEntry- Parameters:
dos- the output stream.- Throws:
java.io.IOException- if an I/O error occurs.
-
equals
public abstract boolean equals(java.lang.Object obj)
- Specified by:
equalsin classClassFileEntry
-
getGlobalIndex
public int getGlobalIndex()
Gets the global index.- Returns:
- the global index.
-
getTag
public byte getTag()
Gets the tag.- Returns:
- the tag.
-
hashCode
public abstract int hashCode()
- Specified by:
hashCodein classClassFileEntry
-
writeBody
protected abstract void writeBody(java.io.DataOutputStream dos) throws java.io.IOException
Writes this instance to the given output stream.- Parameters:
dos- the output stream.- Throws:
java.io.IOException- if an I/O error occurs.
-
-