org.cojen.classfile
Class ConstantInfo
java.lang.Object
org.cojen.classfile.ConstantInfo
- Direct Known Subclasses:
- ConstantClassInfo, ConstantDoubleInfo, ConstantFieldInfo, ConstantFloatInfo, ConstantIntegerInfo, ConstantInterfaceMethodInfo, ConstantLongInfo, ConstantMethodInfo, ConstantNameAndTypeInfo, ConstantStringInfo, ConstantUTFInfo
public abstract class ConstantInfo
- extends Object
This class corresponds to the cp_info structure as defined in
section 4.4 of The Java Virtual Machine Specification.
Subclasses should override the default hashCode and equals methods so
that the ConstantPool will only contain one instance of this constant.
- Author:
- Brian S O'Neill
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TAG_UTF8
public static final int TAG_UTF8
- See Also:
- Constant Field Values
TAG_INTEGER
public static final int TAG_INTEGER
- See Also:
- Constant Field Values
TAG_FLOAT
public static final int TAG_FLOAT
- See Also:
- Constant Field Values
TAG_LONG
public static final int TAG_LONG
- See Also:
- Constant Field Values
TAG_DOUBLE
public static final int TAG_DOUBLE
- See Also:
- Constant Field Values
TAG_CLASS
public static final int TAG_CLASS
- See Also:
- Constant Field Values
TAG_STRING
public static final int TAG_STRING
- See Also:
- Constant Field Values
TAG_FIELD
public static final int TAG_FIELD
- See Also:
- Constant Field Values
TAG_METHOD
public static final int TAG_METHOD
- See Also:
- Constant Field Values
TAG_INTERFACE_METHOD
public static final int TAG_INTERFACE_METHOD
- See Also:
- Constant Field Values
TAG_NAME_AND_TYPE
public static final int TAG_NAME_AND_TYPE
- See Also:
- Constant Field Values
ConstantInfo
protected ConstantInfo(int tag)
getIndex
public int getIndex()
- The index of this constant in the constant pool. Is -1 if the
index has not yet been resolved. Constant pool indexes are resolved
when the constant pool is written out.
hasPriority
protected boolean hasPriority()
getEntryCount
protected int getEntryCount()
writeTo
public void writeTo(DataOutput dout)
throws IOException
- Throws:
IOException
Copyright © 2004-2011 Brian S O'Neill. All Rights Reserved.