Class CPClass
- java.lang.Object
-
- kala.compress.harmony.unpack200.bytecode.ClassFileEntry
-
- kala.compress.harmony.unpack200.bytecode.ConstantPoolEntry
-
- kala.compress.harmony.unpack200.bytecode.CPClass
-
public class CPClass extends ConstantPoolEntry
Constant pool entry for a class
-
-
Field Summary
Fields Modifier and Type Field Description private intcachedHashCodeprivate booleanhashCodeComputedprivate intindexjava.lang.Stringnameprivate CPUTF8utf8-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)private voidgenerateHashCode()java.lang.StringgetName()protected ClassFileEntry[]getNestedClassFileEntries()inthashCode()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
-
Methods inherited from class kala.compress.harmony.unpack200.bytecode.ClassFileEntry
objectHashCode, write
-
-
-
-
Field Detail
-
index
private int index
-
name
public java.lang.String name
-
utf8
private final CPUTF8 utf8
-
hashCodeComputed
private boolean hashCodeComputed
-
cachedHashCode
private int cachedHashCode
-
-
Constructor Detail
-
CPClass
public CPClass(CPUTF8 name, int globalIndex)
Creates a new CPClass- Parameters:
name- TODOglobalIndex- index in CpBands- Throws:
java.lang.NullPointerException- if name is null
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin classConstantPoolEntry
-
generateHashCode
private void generateHashCode()
-
getName
public java.lang.String getName()
-
getNestedClassFileEntries
protected ClassFileEntry[] getNestedClassFileEntries()
- Overrides:
getNestedClassFileEntriesin classClassFileEntry
-
hashCode
public int hashCode()
- Specified by:
hashCodein classConstantPoolEntry
-
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
-
-