| java.lang.Object org.apache.derby.iapi.services.classfile.ClassHolder
All known Subclasses: org.apache.derby.iapi.services.classfile.ClassInvestigator,
ClassHolder | public class ClassHolder (Code) | | Based upon "THE class FILE FORMAT" chapter of "The Java Virtual Machine Specification"
corresponding to version 1.0.2 of the Java Virtual Machine and 1.0.2 of the
Java Language Specification.
ISBN 0-201-63452-X, September 1996.
|
Constructor Summary | |
protected | ClassHolder(int estimatedConstantPoolCount) | 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. |
Method Summary | |
public void | addAttribute(String attributeName, ClassFormatOutput info) | public int | addClassReference(String fullyQualifiedName) Add a class entry to the pool. | public int | addConstant(String value) | public int | addConstant(int value) | public int | addConstant(float value) | public int | addConstant(long value) | public int | addConstant(double value) | protected int | addEntry(Object key, ConstantPoolEntry item) Generic add entry to constant pool. | public int | addFieldReference(String className, String simpleName, String descriptor) | public int | addFieldReference(ClassMember field) | public ClassMember | addMember(String simpleName, String descriptor, int modifier) | public int | addMethodReference(String className, String simpleName, String descriptor, boolean isInterface) | public int | addUtf8(String value) | protected String | className(int classIndex) Return the class name for an index to a CONSTANT_Class_info. | public static String | convertToInternalClassName(String externalName) | public static String | convertToInternalDescriptor(String externalName) | protected void | cptPut(ClassFormatOutput out) | public int | findClass(String fullyQualifiedName) Find a class descriptor (section 4.4.1) and return its
index, returns -1 if not found. | protected CONSTANT_Index_info | findIndexEntry(int tag, int i1, int i2) | protected int | findIndexIndex(int tag, int i1, int i2) | protected ConstantPoolEntry | findMatchingEntry(Object key) | public int | findNameAndType(String name, String descriptor) Find a name and type descriptor (section 4.4.6) and
return it's index. | int | findUtf8(String value) Return the index of a UTF entry or -1 if it doesn't exist. | 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 | getConstantPoolIndex() | public ConstantPoolEntry | getEntry(int index) | public ByteArray | getFileFormat() Convert the object representation of the class into
its class file format. | public int | getModifier() | public String | getName() | public String | getSuperClassName() | public static boolean | isExternalClassName(String className) | String | nameIndexToString(int index) |
access_flags | protected int access_flags(Code) | | |
interfaces | protected int[] interfaces(Code) | | |
super_class | protected int super_class(Code) | | |
this_class | protected int this_class(Code) | | |
ClassHolder | protected ClassHolder(int estimatedConstantPoolCount)(Code) | | |
ClassHolder | public ClassHolder(String fullyQualifiedName, String superClassName, int modifiers)(Code) | | This will not define a constructor -- it is up
to the caller to add at least one.
|
addClassReference | public int addClassReference(String fullyQualifiedName)(Code) | | Add a class entry to the pool.
|
addEntry | protected int addEntry(Object key, ConstantPoolEntry item)(Code) | | Generic add entry to constant pool. Includes the logic
for an entry to occupy more than one slot (e.g. long).
The number of slots occupied by the entry.. |
className | protected String className(int classIndex)(Code) | | Return the class name for an index to a CONSTANT_Class_info.
|
convertToInternalClassName | public static String convertToInternalClassName(String externalName)(Code) | | |
convertToInternalDescriptor | public static String convertToInternalDescriptor(String externalName)(Code) | | |
findClass | public int findClass(String fullyQualifiedName)(Code) | | Find a class descriptor (section 4.4.1) and return its
index, returns -1 if not found.
|
findIndexIndex | protected int findIndexIndex(int tag, int i1, int i2)(Code) | | |
findNameAndType | public int findNameAndType(String name, String descriptor)(Code) | | Find a name and type descriptor (section 4.4.6) and
return it's index.
returns -1 if not found.
|
findUtf8 | int findUtf8(String value)(Code) | | Return the index of a UTF entry or -1 if it doesn't exist.
|
getClassName | protected String getClassName(int index)(Code) | | get the class name of a Class given the index of its CONSTANT_Class_info
entry in the Constant Pool.
|
getFileFormat | public ByteArray getFileFormat() throws IOException(Code) | | Convert the object representation of the class into
its class file format.
exception: IOException - error writing the class |
isExternalClassName | public static boolean isExternalClassName(String className)(Code) | | |
nameIndexToString | String nameIndexToString(int index)(Code) | | get a string (UTF) given a name_index into the constant pool
|
|
|