| Modifier and Type | Field and Description |
|---|---|
| protected int | |
| protected Attributes | |
| protected Vector | |
| private int | |
| protected Hashtable | |
| protected MemberTable | |
| protected int[] | |
| protected int | major_version
Minor class format number defaults to VMDescriptor.JAVA_CLASS_FORMAT_MAJOR_VERSION |
| protected MemberTable | |
| protected int | minor_version
Minor class format number defaults to VMDescriptor.JAVA_CLASS_FORMAT_MINOR_VERSION which currently corresponds to a really old (JDK 1.0.2) setting. |
| private final CONSTANT_Index_info | searchIndex
Used to search for index entries to avoid object allocation in the case a referecne already exists. |
| protected int | |
| protected int |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | ClassHolder(String fullyQualifiedName, String superClassName, int modifiers)
This will not define a constructor -- it is up to the caller to add at least one. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public int | |
| public int | |
| public int | |
| public int | |
| public int | |
| public int | |
| private int | Returns: the constant pool index of the added or existing item.Add an entry, but only if it doesn't exist. |
| protected int | Returns: The number of slots occupied by the entry. .Generic add entry to constant pool. |
| private CONSTANT_Utf8_info | |
| public int | |
| public int | |
| private int | |
| public ClassMember | |
| public int | |
| private int | |
| private int | |
| private int | |
| private int | |
| public int | |
| private CONSTANT_Utf8_info | |
| protected String | |
| private static String | |
| public static String | |
| public static String | |
| protected void | |
| public int | |
| protected CONSTANT_Index_info | |
| protected int | |
| protected ConstantPoolEntry | |
| public int | findNameAndType(String name, String descriptor)
Find a name and type descriptor (section 4.4.6) and return it's index. |
| pack-priv int | |
| protected String | getClassName(int index)
get the class name of a Class given the index of its CONSTANT_Class_info entry in the Constant Pool. |
| public int | |
| public ConstantPoolEntry | |
| public ByteArray | |
| public int | |
| public String | |
| public String | |
| public static boolean | |
| private static String | makeDesc(char builtin, int arity)
A helper to build a type description based on a built-in type and an array arity. |
| private static String | |
| pack-priv String | |
| private void |
| access_flags | back to summary |
|---|---|
| protected int access_flags | |
| attribute_info | back to summary |
|---|---|
| protected Attributes attribute_info | |
| cptEntries | back to summary |
|---|---|
| protected Vector<ConstantPoolEntry> cptEntries | |
| cptEstimatedSize | back to summary |
|---|---|
| private int cptEstimatedSize | |
| cptHashTable | back to summary |
|---|---|
| protected Hashtable<Object, ConstantPoolEntry> cptHashTable | |
| field_info | back to summary |
|---|---|
| protected MemberTable field_info | |
| interfaces | back to summary |
|---|---|
| protected int[] interfaces | |
| major_version | back to summary |
|---|---|
| protected int major_version Minor class format number defaults to VMDescriptor.JAVA_CLASS_FORMAT_MAJOR_VERSION | |
| method_info | back to summary |
|---|---|
| protected MemberTable method_info | |
| minor_version | back to summary |
|---|---|
| protected int minor_version Minor class format number defaults to VMDescriptor.JAVA_CLASS_FORMAT_MINOR_VERSION which currently corresponds to a really old (JDK 1.0.2) setting. The default major and minor value is used by the generated code for Derby's SQL statements. Currently there is no need to bump the version number as the generated code does not take advantage of any of the new elements in the class file format. If such a need exists then this can be bumped. One issue is that the change in format numbers is not well documented. | |
| searchIndex | back to summary |
|---|---|
| private final CONSTANT_Index_info searchIndex Used to search for index entries to avoid object allocation in the case a referecne already exists. | |
| super_class | back to summary |
|---|---|
| protected int super_class | |
| this_class | back to summary |
|---|---|
| protected int this_class | |
| ClassHolder | back to summary |
|---|---|
| protected ClassHolder(int estimatedConstantPoolCount) | |
| ClassHolder | back to summary |
|---|---|
| public ClassHolder(String fullyQualifiedName, String superClassName, int modifiers) This will not define a constructor -- it is up to the caller to add at least one. | |
| addAttribute | back to summary |
|---|---|
| public void addAttribute(String attributeName, ClassFormatOutput info) | |
| addClassReference | back to summary |
|---|---|
| public int addClassReference(String fullyQualifiedName) Add a class entry to the pool. | |
| addConstant | back to summary |
|---|---|
public int addConstant(String value)
| |
| addConstant | back to summary |
|---|---|
public int addConstant(int value)
| |
| addConstant | back to summary |
|---|---|
public int addConstant(float value)
| |
| addConstant | back to summary |
|---|---|
public int addConstant(long value)
| |
| addConstant | back to summary |
|---|---|
public int addConstant(double value)
| |
| addDirectEntry | back to summary |
|---|---|
| private int addDirectEntry(ConstantPoolEntry item) Add an entry, but only if it doesn't exist.
| |
| addEntry | back to summary |
|---|---|
| protected int addEntry(Object key, ConstantPoolEntry item) Generic add entry to constant pool. Includes the logic for an entry to occupy more than one slot (e.g. long).
| |
| addExtraUtf8 | back to summary |
|---|---|
| private CONSTANT_Utf8_info addExtraUtf8(String value) Add an extra UTF8 into the pool | |
| addFieldReference | back to summary |
|---|---|
public int addFieldReference(String className, String simpleName, String descriptor)
| |
| addFieldReference | back to summary |
|---|---|
| public int addFieldReference(ClassMember field) | |
| addIndexReference | back to summary |
|---|---|
| private int addIndexReference(int tag, int i1, int i2) Add an index reference. | |
| addMember | back to summary |
|---|---|
public ClassMember addMember(String simpleName, String descriptor, int modifier)
| |
| addMethodReference | back to summary |
|---|---|
public int addMethodReference(String className, String simpleName, String descriptor, boolean isInterface)
| |
| addNameAndType | back to summary |
|---|---|
| private int addNameAndType(String name, String descriptor) Add a name and type entry | |
| addReference | back to summary |
|---|---|
| private int addReference(int tag, String className, String simpleName, String descriptor) | |
| addReference | back to summary |
|---|---|
| private int addReference(int tag, ClassMember member) | |
| addString | back to summary |
|---|---|
| private int addString(String value) Add a string entry | |
| addUtf8 | back to summary |
|---|---|
public int addUtf8(String value)
| |
| addUtf8Entry | back to summary |
|---|---|
| private CONSTANT_Utf8_info addUtf8Entry(String value) Add a UTF8 into the pool and return the index to it. | |
| className | back to summary |
|---|---|
| protected String className(int classIndex) Return the class name for an index to a CONSTANT_Class_info. | |
| convertToInternal | back to summary |
|---|---|
| private static String convertToInternal(String externalName, boolean descriptor) | |
| convertToInternalClassName | back to summary |
|---|---|
| public static String convertToInternalClassName(String externalName) | |
| convertToInternalDescriptor | back to summary |
|---|---|
| public static String convertToInternalDescriptor(String externalName) | |
| cptPut | back to summary |
|---|---|
| protected void cptPut(ClassFormatOutput out) throws IOException | |
| findClass | back to summary |
|---|---|
| public int findClass(String fullyQualifiedName) Find a class descriptor (section 4.4.1) and return its index, returns -1 if not found. | |
| findIndexEntry | back to summary |
|---|---|
| protected CONSTANT_Index_info findIndexEntry(int tag, int i1, int i2) | |
| findIndexIndex | back to summary |
|---|---|
| protected int findIndexIndex(int tag, int i1, int i2) | |
| findMatchingEntry | back to summary |
|---|---|
| protected ConstantPoolEntry findMatchingEntry(Object key) | |
| findNameAndType | back to summary |
|---|---|
| public int findNameAndType(String name, String descriptor) Find a name and type descriptor (section 4.4.6) and return it's index. returns -1 if not found. | |
| findUtf8 | back to summary |
|---|---|
| pack-priv int findUtf8(String value) Return the index of a UTF entry or -1 if it doesn't exist. | |
| getClassName | back to summary |
|---|---|
| protected String getClassName(int index) get the class name of a Class given the index of its CONSTANT_Class_info entry in the Constant Pool. | |
| getConstantPoolIndex | back to summary |
|---|---|
public int getConstantPoolIndex()
| |
| getEntry | back to summary |
|---|---|
| public ConstantPoolEntry getEntry(int index) | |
| getFileFormat | back to summary |
|---|---|
| public ByteArray getFileFormat() throws IOException Convert the object representation of the class into its class file format.
| |
| getModifier | back to summary |
|---|---|
public int getModifier()
| |
| getName | back to summary |
|---|---|
public String getName()
| |
| getSuperClassName | back to summary |
|---|---|
| public String getSuperClassName() | |
| isExternalClassName | back to summary |
|---|---|
| public static boolean isExternalClassName(String className) | |
| makeDesc | back to summary |
|---|---|
| private static String makeDesc(char builtin, int arity) A helper to build a type description based on a built-in type and an array arity. | |
| makeDesc | back to summary |
|---|---|
| private static String makeDesc(String className, int arity, boolean descriptor) A helper to build a type description based on a Java class and an array arity. If descriptor is true create a descriptor according to section 4.3.2 of the vm spec. If false create a class name according to sections 4.3.2 and 4.4.1 of the vm spec. | |
| nameIndexToString | back to summary |
|---|---|
| pack-priv String nameIndexToString(int index) get a string (UTF) given a name_index into the constant pool | |
| put | back to summary |
|---|---|
| private void put(ClassFormatOutput out) throws IOException | |