1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
|
<!-- ##### SECTION Title ##### -->
Constant pool
<!-- ##### SECTION Short_Description ##### -->
Constant pool structures and operations.
<!-- ##### SECTION Long_Description ##### -->
<para>
The constant pool is a table in each class that contains the values for
all constants.
Typically any reference to a constant anywhere in a class
file is using the index of that constant in the table.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ENUM ConstantTag ##### -->
<para>
Tag value for constant pool entries.
</para>
@CONSTANT_Empty: Empty.
@CONSTANT_Utf8: UTF-8 string.
@CONSTANT_Integer: Integer.
@CONSTANT_Float: float.
@CONSTANT_Long: long.
@CONSTANT_Double: double.
@CONSTANT_Class: reference to a class/interface.
@CONSTANT_String: reference to a string.
@CONSTANT_Fieldref: reference to a field.
@CONSTANT_Methodref: reference to a method.
@CONSTANT_InterfaceMethodref: a reference to an interface method.
@CONSTANT_NameAndType: name and type information.
<!-- ##### ENUM IntType ##### -->
<para>
Specifies the type for constants which are internally promoted to int.
</para>
@INT_IS_INT: int.
@INT_IS_BOOLEAN: boolean.
@INT_IS_CHAR: char.
@INT_IS_SHORT: short.
@INT_IS_BYTE: byte.
<!-- ##### STRUCT ClassEntry ##### -->
<para>
Constant pool entry for a class reference.
The tag value for this entry is %CONSTANT_Class.
</para>
@name_index:
<!-- ##### STRUCT ReferenceEntry ##### -->
<para>
Constant pool entry for a field, method or interface method reference.
Tag values for this type of entries are
%CONSTANT_Fieldref for fields,
%CONSTANT_Methodref for methods
and %CONSTANT_InterfaceMethodref for interface methods.
</para>
@class_index:
@name_and_type_index:
<!-- ##### STRUCT StringEntry ##### -->
<para>
Constant pool entry for a string reference.
The tag value for this entry is %CONSTANT_String.
</para>
@string_index:
<!-- ##### STRUCT IntegerEntry ##### -->
<para>
Constant pool entry for an integer or a float. Tag values for this type of
entries are %CONSTANT_Integer for integers and %CONSTANT_Float for floats.
</para>
@bytes:
<!-- ##### STRUCT LongEntry ##### -->
<para>
Constant pool entry for a long or double.
Tag values for this type of entries
are %CONSTANT_Long for longs and %CONSTANT_Double for doubles.
<note>The next entry in the constant pool after each long/double
is reserved for the VM. That extra entry is counted even though it
is not physically present in the file.
</note>
</para>
@long_bytes:
<!-- ##### STRUCT NameAndTypeEntry ##### -->
<para>
Constant pool entry for name and type information.
The tag value for this entry is %CONSTANT_NameAndType.
</para>
@name_index:
@descriptor_index:
<!-- ##### STRUCT UTF8Entry ##### -->
<para>
Constant pool entry for UTF-8 data.
The tag value for this entry is %CONSTANT_Utf8
</para>
@length:
@contents:
<!-- ##### STRUCT ConstantPoolEntry ##### -->
<para>
Constant pool entry.
</para>
@tag:
<!-- ##### STRUCT ConstantPool ##### -->
<para>
The Constant Pool.
The number of entries also includes some entries that are reserved for
the runtime environment and are not physically present in the file.
Those entries are marked with a tag of %CONSTANT_Empty.
</para>
@count:
@this_class:
@super_class:
@entries:
<!-- ##### FUNCTION jclass_cp_new ##### -->
<para>
</para>
@filename:
@classpath:
@Returns:
<!-- # Unused Parameters # -->
@bootclasspath:
<!-- ##### FUNCTION jclass_cp_new_from_buffer ##### -->
<para>
</para>
@data:
@Returns:
<!-- ##### FUNCTION jclass_cp_new_from_file ##### -->
<para>
</para>
@classfile:
@Returns:
<!-- ##### FUNCTION jclass_cp_free ##### -->
<para>
</para>
@cpool:
<!-- ##### FUNCTION jclass_cp_get_this_class_name ##### -->
<para>
</para>
@cpool:
@Returns:
<!-- ##### FUNCTION jclass_cp_get_super_class_name ##### -->
<para>
</para>
@cpool:
@Returns:
<!-- ##### FUNCTION jclass_cp_get_class_name ##### -->
<para>
</para>
@cpool:
@index:
@ignore_arrays:
@Returns:
<!-- ##### FUNCTION jclass_cp_get_method_signature ##### -->
<para>
</para>
@cpool:
@index:
@return_type:
@Returns:
<!-- ##### FUNCTION jclass_cp_get_constant_value ##### -->
<para>
</para>
@cpool:
@index:
@int_type:
@Returns:
<!-- ##### FUNCTION jclass_cp_get_entry_type ##### -->
<para>
</para>
@cpool:
@index:
@Returns:
|