Class CPRef
- java.lang.Object
-
- kala.compress.harmony.unpack200.bytecode.ClassFileEntry
-
- kala.compress.harmony.unpack200.bytecode.ConstantPoolEntry
-
- kala.compress.harmony.unpack200.bytecode.CPRef
-
- Direct Known Subclasses:
CPInterfaceMethodRef,CPMethodRef
public abstract class CPRef extends ConstantPoolEntry
Abstract superclass for reference constant pool entries, such as a method or field reference.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringcachedToString(package private) CPClassclassName(package private) intclassNameIndexprotected CPNameAndTypenameAndType(package private) intnameAndTypeIndex-
Fields inherited from class kala.compress.harmony.unpack200.bytecode.ConstantPoolEntry
CP_Class, CP_Double, CP_Fieldref, CP_Float, CP_Integer, CP_InterfaceMethodref, CP_Long, CP_Methodref, CP_NameAndType, CP_String, CP_UTF8, globalIndex, tag
-
Fields inherited from class kala.compress.harmony.unpack200.bytecode.ClassFileEntry
NONE
-
-
Constructor Summary
Constructors Constructor Description CPRef(byte type, CPClass className, CPNameAndType descriptor, int globalIndex)Constructs a new CPRef.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)protected ClassFileEntry[]getNestedClassFileEntries()protected voidresolve(ClassConstantPool pool)Allows the constant pool entries to resolve their nested entries.java.lang.StringtoString()protected voidwriteBody(java.io.DataOutputStream dos)-
Methods inherited from class kala.compress.harmony.unpack200.bytecode.ConstantPoolEntry
doWrite, getGlobalIndex, getTag, hashCode
-
Methods inherited from class kala.compress.harmony.unpack200.bytecode.ClassFileEntry
objectHashCode, write
-
-
-
-
Field Detail
-
className
CPClass className
-
classNameIndex
transient int classNameIndex
-
nameAndType
protected CPNameAndType nameAndType
-
nameAndTypeIndex
transient int nameAndTypeIndex
-
cachedToString
protected java.lang.String cachedToString
-
-
Constructor Detail
-
CPRef
public CPRef(byte type, CPClass className, CPNameAndType descriptor, int globalIndex)Constructs a new CPRef.- Parameters:
type- TODOclassName- TODOdescriptor- TODOglobalIndex- index in CpBands- Throws:
java.lang.NullPointerException- if descriptor or className is null
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin classConstantPoolEntry
-
getNestedClassFileEntries
protected ClassFileEntry[] getNestedClassFileEntries()
- Overrides:
getNestedClassFileEntriesin classClassFileEntry
-
resolve
protected void resolve(ClassConstantPool pool)
Description copied from class:ClassFileEntryAllows the constant pool entries to resolve their nested entries.- Overrides:
resolvein classClassFileEntry- Parameters:
pool- TODO
-
toString
public java.lang.String toString()
- Specified by:
toStringin classClassFileEntry
-
writeBody
protected void writeBody(java.io.DataOutputStream dos) throws java.io.IOException- Specified by:
writeBodyin classConstantPoolEntry- Throws:
java.io.IOException
-
-