#include <Class.h>
The structure covers all operations that may be required to run on the constant pool, such as parsing and processing queries.
Public Member Functions | |
| ConstantPool () | |
| Initializes the constant pool to its initial values. | |
| ~ConstantPool () | |
| Clears constant pool content (if there are any). | |
| bool | available () const |
| Checks whether the constant pool is not empty. | |
| uint16 | get_size () const |
| Gets the size of the given constant pool. | |
| bool | is_valid_index (uint16 index) const |
| Checks whether the index is a valid one in the constant pool. | |
| bool | is_entry_resolved (uint16 index) const |
| Checks whether the constant-pool entry is resolved. | |
| bool | is_entry_in_error (uint16 index) const |
| Checks whether the resolution of the constant-pool entry has failed. | |
| bool | is_utf8 (uint16 index) const |
| Checks whether the constant-pool entry represents the string of the CONSTANT_Utf8 type. | |
| bool | is_class (uint16 index) const |
| Checks whether the constant-pool entry refers to a CONSTANT_Class. | |
| bool | is_constant (uint16 index) const |
| Checks whether the constant-pool entry contains a constant. | |
| bool | is_string (uint16 index) const |
| Checks whether the constant-pool entry is a literal constant. | |
| bool | is_name_and_type (uint16 index) const |
| Checks whether the constant-pool entry is CONSTANT_NameAndType. | |
| bool | is_fieldref (uint16 index) const |
| Checks whether the constant-pool entry contains a field reference, CONSTANT_Fieldref. | |
| bool | is_methodref (uint16 index) const |
| Checks whether the constant-pool entry contains a method reference, CONSTANT_Methodref. | |
| bool | is_interfacemethodref (uint16 index) const |
| Checks whether the constant-pool entry constains an interface-method reference, CONSTANT_InterfaceMethodref. | |
| unsigned char | get_tag (uint16 index) const |
| Gets a tag of the referenced constant-pool entry. | |
| const char * | get_utf8_chars (uint16 index) const |
Gets characters from the utf8 string stored in the constant pool. | |
| String * | get_utf8_string (uint16 index) const |
Gets the utf8 string stored in the constant pool. | |
| const char * | get_string_chars (uint16 index) const |
Gets characters stored in the utf8 string for the CONSTANT_String entry. | |
| String * | get_string (uint16 index) const |
Gets the utf8 string stored for the CONSTANT_String entry. | |
| String * | get_name_and_type_name (uint16 index) const |
Gets the utf8 string representing the name part of the name-and-type constant-pool entry. | |
| String * | get_name_and_type_descriptor (uint16 index) const |
Gets the utf8 string representing the descriptor part of the name-and-type constant-pool entry. | |
| Class_Member * | get_ref_class_member (uint16 index) const |
Gets the generic class member for the CONSTANT_*ref constant-pool entry. | |
| Method * | get_ref_method (uint16 index) const |
| Gets the method from the CONSTANT_Methodref or the CONSTANT_InterfaceMethodref constant-pool entry. | |
| Field * | get_ref_field (uint16 index) const |
| Gets the field from the CONSTANT_Fieldref constant-pool entry. | |
| Class * | get_class_class (uint16 index) const |
| Gets the class for the CONSTANT_Class constant-pool entry. | |
| uint32 | get_4byte (uint16 index) const |
| Gets a 32-bit value (either interger or float) for a constant stored in the constant pool. | |
| uint32 | get_int (uint16 index) const |
| Gets an integer value for a constant stored in the constant pool. | |
| float | get_float (uint16 index) const |
| Gets a float value for a constant stored in the constant pool. | |
| uint32 | get_8byte_low_word (uint16 index) const |
| Gets a low word of the 64-bit constant (either long or double) stored in the constant pool. | |
| uint32 | get_8byte_high_word (uint16 index) const |
| Gets a high word of the 64-bit constant (either long or double) stored in the constant pool. | |
| void * | get_address_of_constant (uint16 index) const |
| Gets an address of a constant stored in the constant pool. | |
| jthrowable | get_error_cause (uint16 index) const |
| Gets an exception, which has caused failure of the referred constant-pool entry. | |
| ConstPoolEntry * | get_error_chain () const |
| Gets a head of a single-linked list containing resolution errors in the given constant pool. | |
| uint16 | get_string_index (uint16 index) const |
Gets an an index in the constant pool where the utf8 representation for CONSTANT_String is stored. | |
| uint16 | get_name_and_type_name_index (uint16 index) const |
Gets an index of the constant-pool entry containing the utf8 string with the name part. | |
| uint16 | get_name_and_type_descriptor_index (uint16 index) const |
Gets an index of the constant-pool entry containing the utf8 string with the descriptor part. | |
| uint16 | get_ref_class_index (uint16 index) const |
Gets an index of the constant-pool entry containing a class for the given CONSTANT_*ref entry. | |
| uint16 | get_ref_name_and_type_index (uint16 index) const |
Gets an index of CONSTANT_NameAndType for the given constant-pool entry. | |
| uint16 | get_class_name_index (uint16 index) const |
| Gets a class-name an index in the constant pool for the CONSTANT_Class entry. | |
| void | resolve_entry (uint16 index, Class *clss) |
| Resolves an entry to the class. | |
| void | resolve_entry (uint16 index, Field *field) |
| Resolves an entry to the field. | |
| void | resolve_entry (uint16 index, Method *method) |
| Resolves an entry to the method. | |
| void | resolve_as_error (uint16 index, jthrowable exn) |
| Records a resolution error into a constant-pool entry. | |
| bool | parse (Class *clss, String_Pool &string_pool, ByteReader &cfs) |
| Parses in a constant pool for a class. | |
| bool | check (Global_Env *env, Class *clss, bool is_trusted_cl) |
| Checks constant pool consistency. | |
| void | clear () |
| Clears the constant-pool content: tags and entries arrays. | |
| void | init () |
| Initializes the constant pool to initial values. | |
| ConstantPool.ConstantPool | ( | ) |
Initializes the constant pool to its initial values.
| ConstantPool.~ConstantPool | ( | ) |
Clears constant pool content (if there are any).
| bool ConstantPool.available | ( | ) | const |
Checks whether the constant pool is not empty.
true if the constant pool contains certain entries; otherwise false. | uint16 ConstantPool.get_size | ( | ) | const |
Gets the size of the given constant pool.
| bool ConstantPool.is_valid_index | ( | uint16 | index | ) | const |
Checks whether the index is a valid one in the constant pool.
| [in] | index | - an index in the constant pool |
true if the index is a valid one in the constant pool; otherwise false. | bool ConstantPool.is_entry_resolved | ( | uint16 | index | ) | const |
Checks whether the constant-pool entry is resolved.
| [in] | index | - an index in the constant pool |
true if the entry is resolved; otherwise false. | bool ConstantPool.is_entry_in_error | ( | uint16 | index | ) | const |
Checks whether the resolution of the constant-pool entry has failed.
| [in] | index | - an index in the constant pool |
true if the resolution error is recorded for the entry. | bool ConstantPool.is_utf8 | ( | uint16 | index | ) | const |
Checks whether the constant-pool entry represents the string of the CONSTANT_Utf8 type.
| [in] | index | - an index in the constant pool |
true if the given entry is the utf8 string; otherwise false. | bool ConstantPool.is_class | ( | uint16 | index | ) | const |
Checks whether the constant-pool entry refers to a CONSTANT_Class.
| [in] | index | - an index in the constant pool |
true if the given entry is a class; otherwise false. | bool ConstantPool.is_constant | ( | uint16 | index | ) | const |
Checks whether the constant-pool entry contains a constant.
| [in] | index | - an index in the constant pool |
true if the given entry contains a constant; otherwise false. | bool ConstantPool.is_string | ( | uint16 | index | ) | const |
Checks whether the constant-pool entry is a literal constant.
| [in] | index | - an index in the constant pool |
true if the given entry contains a string; otherwise false. | bool ConstantPool.is_name_and_type | ( | uint16 | index | ) | const |
Checks whether the constant-pool entry is CONSTANT_NameAndType.
| [in] | index | - an index in the constant pool |
true if the given entry contains name-and-type; otherwise false. | bool ConstantPool.is_fieldref | ( | uint16 | index | ) | const |
Checks whether the constant-pool entry contains a field reference, CONSTANT_Fieldref.
| [in] | index | - an index in the constant pool |
true if the given entry contains a field reference; otherwise false. | bool ConstantPool.is_methodref | ( | uint16 | index | ) | const |
Checks whether the constant-pool entry contains a method reference, CONSTANT_Methodref.
| [in] | index | - an index in the constant pool |
true if the given entry contains a method reference; otherwise false. | bool ConstantPool.is_interfacemethodref | ( | uint16 | index | ) | const |
Checks whether the constant-pool entry constains an interface-method reference, CONSTANT_InterfaceMethodref.
| [in] | index | - an index in the constant pool |
true if the given entry contains an interface-method reference; otherwise false. | unsigned char ConstantPool.get_tag | ( | uint16 | index | ) | const |
Gets a tag of the referenced constant-pool entry.
| [in] | index | - an index in the constant pool |
| const char* ConstantPool.get_utf8_chars | ( | uint16 | index | ) | const |
Gets characters from the utf8 string stored in the constant pool.
| [in] | index | - an index in the constant pool |
utf8 string stored in the constant pool. | String* ConstantPool.get_utf8_string | ( | uint16 | index | ) | const |
Gets the utf8 string stored in the constant pool.
| [in] | index | - an index in the constant pool |
utf8 string. | const char* ConstantPool.get_string_chars | ( | uint16 | index | ) | const |
Gets characters stored in the utf8 string for the CONSTANT_String entry.
| [in] | index | - an index in the constant pool |
utf8 string characters for the given constant-pool entry. | String* ConstantPool.get_string | ( | uint16 | index | ) | const |
Gets the utf8 string stored for the CONSTANT_String entry.
| [in] | index | - an index in the constant pool |
utf8 string stored in the constant-pool entry. | String* ConstantPool.get_name_and_type_name | ( | uint16 | index | ) | const |
Gets the utf8 string representing the name part of the name-and-type constant-pool entry.
| [in] | index | - an index in the constant pool |
utf8 string with the name part. | String* ConstantPool.get_name_and_type_descriptor | ( | uint16 | index | ) | const |
Gets the utf8 string representing the descriptor part of the name-and-type constant-pool entry.
| [in] | index | - an index in the constant pool |
utf8 string with the descriptor part. | Class_Member* ConstantPool.get_ref_class_member | ( | uint16 | index | ) | const |
Gets the generic class member for the CONSTANT_*ref constant-pool entry.
| [in] | index | - an index in the constant pool |
| Method* ConstantPool.get_ref_method | ( | uint16 | index | ) | const |
Gets the method from the CONSTANT_Methodref or the CONSTANT_InterfaceMethodref constant-pool entry.
| [in] | index | - an index in the constant pool |
| Field* ConstantPool.get_ref_field | ( | uint16 | index | ) | const |
Gets the field from the CONSTANT_Fieldref constant-pool entry.
| [in] | index | - an index in the constant pool |
| Class* ConstantPool.get_class_class | ( | uint16 | index | ) | const |
Gets the class for the CONSTANT_Class constant-pool entry.
| [in] | index | - an index in the constant pool |
| uint32 ConstantPool.get_4byte | ( | uint16 | index | ) | const |
Gets a 32-bit value (either interger or float) for a constant stored in the constant pool.
| [in] | index | - an index in the constant pool |
| uint32 ConstantPool.get_int | ( | uint16 | index | ) | const |
Gets an integer value for a constant stored in the constant pool.
| [in] | index | - an index in the constant pool |
| float ConstantPool.get_float | ( | uint16 | index | ) | const |
Gets a float value for a constant stored in the constant pool.
| [in] | index | - an index in the constant pool |
| uint32 ConstantPool.get_8byte_low_word | ( | uint16 | index | ) | const |
Gets a low word of the 64-bit constant (either long or double) stored in the constant pool.
| [in] | index | - an index in the constant pool |
| uint32 ConstantPool.get_8byte_high_word | ( | uint16 | index | ) | const |
Gets a high word of the 64-bit constant (either long or double) stored in the constant pool.
| [in] | index | - an index in the constant pool |
| void* ConstantPool.get_address_of_constant | ( | uint16 | index | ) | const |
Gets an address of a constant stored in the constant pool.
| [in] | index | - an index in the constant pool |
| jthrowable ConstantPool.get_error_cause | ( | uint16 | index | ) | const |
Gets an exception, which has caused failure of the referred constant-pool entry.
| [in] | index | - an index in the constant pool |
| ConstPoolEntry* ConstantPool.get_error_chain | ( | ) | const |
Gets a head of a single-linked list containing resolution errors in the given constant pool.
| uint16 ConstantPool.get_string_index | ( | uint16 | index | ) | const |
Gets an an index in the constant pool where the utf8 representation for CONSTANT_String is stored.
| [in] | index | - an index in the constant pool for the CONSTANT_String entry |
utf8 representation of the given string. | uint16 ConstantPool.get_name_and_type_name_index | ( | uint16 | index | ) | const |
Gets an index of the constant-pool entry containing the utf8 string with the name part.
| [in] | index | - an index in the constant pool |
utf8 name string. | uint16 ConstantPool.get_name_and_type_descriptor_index | ( | uint16 | index | ) | const |
Gets an index of the constant-pool entry containing the utf8 string with the descriptor part.
| [in] | index | - an index in the constant pool |
utf8 string for the descriptor. | uint16 ConstantPool.get_ref_class_index | ( | uint16 | index | ) | const |
Gets an index of the constant-pool entry containing a class for the given CONSTANT_*ref entry.
| [in] | index | - an index in the constant pool |
| uint16 ConstantPool.get_ref_name_and_type_index | ( | uint16 | index | ) | const |
Gets an index of CONSTANT_NameAndType for the given constant-pool entry.
| [in] | index | - an index in the constant pool |
| uint16 ConstantPool.get_class_name_index | ( | uint16 | index | ) | const |
Gets a class-name an index in the constant pool for the CONSTANT_Class entry.
| [in] | index | - an index in the constant pool |
utf8 name of the given class. | void ConstantPool.resolve_entry | ( | uint16 | index, | |
| Class * | clss | |||
| ) |
Resolves an entry to the class.
| [in] | index | - an index in the constant pool |
| [in] | clss | - a class to resolve the given entry to |
| void ConstantPool.resolve_entry | ( | uint16 | index, | |
| Field * | field | |||
| ) |
Resolves an entry to the field.
| [in] | index | - an index in the constant pool |
| [in] | field | - a field to resolve the given entry to |
| void ConstantPool.resolve_entry | ( | uint16 | index, | |
| Method * | method | |||
| ) |
Resolves an entry to the method.
| [in] | index | - an index in the constant pool |
| [in] | method | - a method to resolve the given entry to |
| void ConstantPool.resolve_as_error | ( | uint16 | index, | |
| jthrowable | exn | |||
| ) |
Records a resolution error into a constant-pool entry.
| [in] | index | - an index in the constant pool |
| [in] | exn | - a cause of resolution failure |
| bool ConstantPool.parse | ( | Class * | clss, | |
| String_Pool & | string_pool, | |||
| ByteReader & | cfs | |||
| ) |
Parses in a constant pool for a class.
| [in] | clss | - a class containing the given constant pool |
| [in] | string_pool | - a reference to the string pool to intern strings in |
| [in] | cfs | - a byte stream to parse the constant pool from |
true if the constant pool was parsed successfully; false if some error was discovered during the parsing. | bool ConstantPool.check | ( | Global_Env * | env, | |
| Class * | clss, | |||
| bool | is_trusted_cl | |||
| ) |
Checks constant pool consistency.
String representing the internal form of a fully qualified form of a fully qualified name of Class. String representation. | [in] | env | - VM environment |
| [in] | clss | - the class that the given constant pool belongs to |
| [in] | is_trusted_cl | - defines whether class was loaded by trusted classloader. User defined classloaders are not trusted. |
true if the constant pool of clss is valid; otherwise false. | void ConstantPool.clear | ( | ) |
Clears the constant-pool content: tags and entries arrays.
| void ConstantPool.init | ( | ) |
Initializes the constant pool to initial values.
Genereated on Tue Mar 11 19:26:00 2008 by Doxygen.
(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.