public abstract class CPInfo extends AbstractStructure
classFile, debug, SYSTEM_PROPERTY_DEBUG
Constructor and Description |
---|
CPInfo() |
Modifier and Type | Method and Description |
---|---|
static CPInfo |
create(java.io.DataInput in,
ClassFile classFile)
Factory method for creating CPInfo structures.
|
boolean |
equals(java.lang.Object object) |
abstract byte |
getTag()
Get the value of the tag field of the cp_info structure.
|
abstract java.lang.String |
getTagVerbose()
Get the verbose description of the tag field of the
cp_info structure.
|
java.lang.String |
getVerbose()
Get the verbose description of the content of the constant pool entry.
|
int |
hashCode() |
protected java.lang.String |
printAccessFlagsVerbose(int accessFlags)
Utility method for derived structures.
|
static int |
skip(java.io.DataInput in)
Skip a CPInfo structure in a DataInput.
|
debug, getClassFile, getDebug, getLength, printAccessFlags, printAccessFlagsVerbose, printBytes, read, setClassFile, setDebug, write
public static final byte CONSTANT_CLASS
public static final byte CONSTANT_FIELDREF
public static final byte CONSTANT_METHODREF
public static final byte CONSTANT_INTERFACE_METHODREF
public static final byte CONSTANT_STRING
public static final byte CONSTANT_INTEGER
public static final byte CONSTANT_FLOAT
public static final byte CONSTANT_LONG
public static final byte CONSTANT_DOUBLE
public static final byte CONSTANT_NAME_AND_TYPE
public static final byte CONSTANT_METHOD_HANDLE
public static final byte CONSTANT_METHOD_TYPE
public static final byte CONSTANT_UTF8
public static final java.lang.String CONSTANT_CLASS_VERBOSE
public static final java.lang.String CONSTANT_FIELDREF_VERBOSE
public static final java.lang.String CONSTANT_METHODREF_VERBOSE
public static final java.lang.String CONSTANT_INTERFACE_METHODREF_VERBOSE
public static final java.lang.String CONSTANT_STRING_VERBOSE
public static final java.lang.String CONSTANT_INTEGER_VERBOSE
public static final java.lang.String CONSTANT_FLOAT_VERBOSE
public static final java.lang.String CONSTANT_LONG_VERBOSE
public static final java.lang.String CONSTANT_DOUBLE_VERBOSE
public static final java.lang.String CONSTANT_NAME_AND_TYPE_VERBOSE
public static final java.lang.String CONSTANT_METHOD_HANDLE_VERBOSE
public static final java.lang.String CONSTANT_METHOD_TYPE_VERBOSE
public static final java.lang.String CONSTANT_UTF8_VERBOSE
public static CPInfo create(java.io.DataInput in, ClassFile classFile) throws InvalidByteCodeException, java.io.IOException
A CPInfo of the appropriate subtype from the constants package is created.
in
- the DataInput from which to read the CPInfo structureclassFile
- the parent class file of the structure to be createdInvalidByteCodeException
- if the byte code is invalidjava.io.IOException
- if an exception occurs with the DataInputpublic abstract byte getTag()
public abstract java.lang.String getTagVerbose()
public java.lang.String getVerbose() throws InvalidByteCodeException
InvalidByteCodeException
- if the byte code is invalidpublic static int skip(java.io.DataInput in) throws InvalidByteCodeException, java.io.IOException
in
- the DataInput from which to read the CPInfo structureInvalidByteCodeException
- if the byte code is invalidjava.io.IOException
- if an exception occurs with the DataInputpublic boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
protected java.lang.String printAccessFlagsVerbose(int accessFlags)
AbstractStructure
printAccessFlagsVerbose
in class AbstractStructure
accessFlags
- the unsigned short value to print as a hex string