#include <Class.h>
This class contains methods for parsing classes, querying class properties, setting external properties of a class (source file name, class file name), calling the verifier, preparing, resolving and initializing the class.
Public Member Functions | |
| void | init_internals (const Global_Env *env, const String *name, ClassLoader *cl) |
| Initializes class-member variables to their initial values. | |
| void | clear_internals () |
| Clears member variables within a class. | |
| bool | has_super_class () const |
| Determines whether the given class has a super class. | |
| const String * | get_super_class_name () const |
| Gets the name of the super class. | |
| Class * | get_super_class () const |
| Gets the super class of the given class. | |
| ClassLoader * | get_class_loader () const |
| Gets the class loader of the given class. | |
| ManagedObject ** | get_class_handle () const |
Gets the class handle of java.lang.Class for the given class. | |
| const String * | get_name () const |
| Gets the natively interned class name for the given class. | |
| String * | get_java_name () |
| Gets a natively interned class name for the given class. | |
| String * | get_signature () const |
| Gets a class signature. | |
| String * | get_simple_name () |
| Gets a simple name of the class. | |
| Package * | get_package () const |
| Gets a package containing the given class. | |
| int | get_depth () const |
| Gets depth in the hierarchy of the given class. | |
| bool | get_fast_instanceof_flag () const |
| VTable * | get_vtable () const |
| Gets the vtable for the given class. | |
| Allocation_Handle | get_allocation_handle () const |
| Gets an allocation handle for the given class. | |
| size_t | get_source_file_name_length () |
| Gets the length of the source-file name. | |
| const char * | get_source_file_name () |
| Gets a source-file name. | |
| Method * | get_method_from_vtable (unsigned method_idx) const |
Gets a method localed at method_idx in the m_vtable_descriptors table. | |
| unsigned | get_number_of_virtual_method_entries () const |
| Returns the number of virtual methods in vtable. | |
| Class * | get_first_child () const |
| Gets the first subclass for Class Hierarchy Analysis. | |
| Class * | get_next_sibling () const |
| Return the next sibling for Class Hierarchy Analysis. | |
| size_t | get_offset_of_fast_allocation_flag () |
Gets an offset of m_is_fast_allocation_possible in the class. | |
| size_t | get_offset_of_allocation_handle () |
Gets an offset of m_allocation_handle in the class. | |
| size_t | get_offset_of_instance_data_size () |
Gets an offset of m_instance_data_size in the class. | |
| unsigned char | get_number_of_dimensions () const |
| Gets the number of array dimensions. | |
| Class * | get_array_base_class () const |
| Gets the base class of the array (for non-primitive arrays only). | |
| Class * | get_array_element_class () const |
| Gets the class of the array element. | |
| TypeDesc * | get_array_element_type_desc () const |
| Gets the array-element type descriptor. | |
| Class_State | get_state () const |
| Gets the class state. | |
| uint16 | get_number_of_superinterfaces () const |
| Gets a number of superinterfaces. | |
| const String * | get_superinterface_name (uint16 index) const |
| Gets a super-interface name from the array of super-interfaces that the given class implements. | |
| Class * | get_superinterface (uint16 index) const |
| Gets a superinterface from the array of superinterfaces the given class implements. | |
| ConstantPool & | get_constant_pool () |
| Gets a constant pool of the given class. | |
| uint16 | get_number_of_fields () const |
| Gets a number of fields in the given class. | |
| uint16 | get_number_of_static_fields () const |
| Gets a number of static fields in the given class. | |
| Field * | get_field (uint16 index) const |
| Gets a field from the given class by its position in the class-fields array. | |
| void * | get_static_data_address () const |
| Gets an address of the memory block containing static data of the given class. | |
| uint16 | get_number_of_methods () const |
| Gets a number of methods in the given class. | |
| Method * | get_method (uint16 index) const |
| Gets a method from the given class by its position in the class-method array. | |
| uint16 | get_declaring_class_index () const |
| Gets a constant-pool index of the declaring class. | |
| uint16 | get_enclosing_class_index () const |
| Gets a constant-pool index of the enclosing class. | |
| uint16 | get_enclosing_method_index () const |
| Gets a constant-pool index of the enclosing method. | |
| uint16 | get_number_of_inner_classes () const |
| Gets a number of inner classes. | |
| uint16 | get_inner_class_index (uint16 index) const |
| Gets an index in the constant pool of the given class, which describes the inner class. | |
| uint16 | get_inner_class_access_flags (uint16 index) const |
| Gets access flags for the inner class. | |
| AnnotationTable * | get_annotations () const |
| Gets a collection of annotations. | |
| AnnotationTable * | get_invisible_annotations () const |
| Gets a collection of invisible annotations. | |
| unsigned int | get_allocated_size () const |
| Gets a class instance size. | |
| unsigned int | get_instance_data_size () const |
| unsigned int | get_array_element_size () const |
| Gets the array-alement size. | |
| unsigned | get_id () const |
| Gets the class ID. | |
| uint16 | get_version () const |
| Gets major version of class file. | |
| uint16 | get_access_flags () const |
| Gets access and properties flags of the given class. | |
| bool | is_primitive () const |
| Checks whether the given class represents the primitive type. | |
| bool | is_array () const |
| Checks whether the given class represents an array. | |
| bool | is_array_of_primitives () const |
| Checks whether the base class of the given array is primitive. | |
| bool | is_public () const |
Checks whether the class has the ACC_PUBLIC flag set. | |
| bool | is_private () const |
Checks whether the class has the ACC_PUBLIC flag set. | |
| bool | is_protected () const |
Checks whether the class has the ACC_PUBLIC flag set. | |
| bool | is_final () const |
Checks whether the class has the ACC_FINAL flag set. | |
| bool | is_super () const |
Checks whether the class has the ACC_SUPER flag set. | |
| bool | is_interface () const |
Checks whether the class has the ACC_INTERFACE flag set. | |
| bool | is_abstract () const |
Checks whether the class has the ACC_ABSTRACT flag set. | |
| bool | is_enum () const |
Checks whether the class is enum, that is the ACC_ENUM flag is set. | |
| bool | is_synthetic () const |
Checks whether the class has the ACC_SYNTHETIC flag set. | |
| bool | is_annotation () const |
| Checks whether the class is an annotation. | |
| bool | has_finalizer () const |
| Checks whether the given class has a finalizer. | |
| bool | is_inner_class () const |
| Checks whether the given class is an inner class of some other class. | |
| bool | can_access_inner_class (Global_Env *env, Class *inner_class) |
Checks whether the given class can access inner_class. | |
| bool | can_access_member (Class_Member *member) |
| Checks whether the given class can access a member class. | |
| bool | has_source_information () const |
| Checks whether the given class has a source-file name available. | |
| bool | is_initializing () const |
| Checks whether the given class is in the process of initialization. | |
| bool | is_initialized () const |
| Checks whether the class is initialized. | |
| bool | in_error () const |
| Checks whether the class is in the error state. | |
| bool | is_at_least_prepared () const |
| Checks whether the given class has a passed preparation stage. | |
| bool | is_instanceof (Class *clss) |
Checks whether the given class represents a class that is a subtype of clss, according to the Java instance of rules. | |
| void | set_class_file_name (const char *cf_name) |
| FIXME: all setter functions must be rethought to become private or to be removed altogether, if possible. | |
| void | set_instance_data_size_constraint_bit () |
| Sets instance data size constraint bit to let the allocation know there are constraints on the way instance should be allocated. | |
| void | set_class_handle (ManagedObject **oh) |
Sets a class handle of java.lang.Class for the given class. | |
| bool | parse (Global_Env *env, ByteReader &cfs) |
| Constructs internal representation of a class from the byte array (defines class). | |
| bool | load_ancestors (Global_Env *env) |
| Loads a super class and super interfaces of the given class. | |
| bool | verify (const Global_Env *env) |
| Verifies bytecodes of the class. | |
| bool | verify_constraints (const Global_Env *env) |
| Verifies constraints for the given class collected during the bytecodes verification. | |
| void | setup_as_primitive (ClassLoader *cl) |
| Setups the given class as representing a primitive type. | |
| void | setup_as_array (Global_Env *env, unsigned char num_dimensions, bool isArrayOfPrimitives, Class *baseClass, Class *elementClass) |
| Sets up the given class as representing an array. | |
| bool | prepare (Global_Env *env) |
| Prepares a class:. | |
| Class * | _resolve_class (Global_Env *env, unsigned cp_index) |
| Resolves a constant-pool entry to a class. | |
| Class * | resolve_declaring_class (Global_Env *env) |
| Resolves a declaring class. | |
| Field * | _resolve_field (Global_Env *env, unsigned cp_index) |
| Resolves a field in the constant pool of the given class. | |
| Method * | _resolve_method (Global_Env *env, unsigned cp_index) |
| Resolves a method in the constant pool of the given class. | |
| void | initialize () |
| Initializes the class. | |
| Field * | lookup_field (const String *name, const String *descriptor) |
| Looks up the field with specified name and descriptor in the given class only. | |
| Field * | lookup_field_recursive (const String *name, const String *descriptor) |
| Looks up the field with specified name and descriptor in the given class and also in the super class and super-interfaces recursively. | |
| Method * | lookup_method (const String *name, const String *desc) |
| Looks up a method with a specified name and descriptor in the given class only. | |
| ManagedObject * | allocate_instance () |
| Allocates an instance of the given class and returns a pointer to it. | |
| unsigned | calculate_array_size (int length) const |
| Calculates a size of the block allocated for the array, which is represented by the given class. | |
| unsigned | calculate_size () |
| Estimates the amount of memory allocated for C++ part of the given class. | |
| void | register_jit_extended_class_callback (JIT *jit_to_be_notified, void *callback_data) |
| Registers a callback that is called to notify the given JIT whenever the given class is extended. | |
| void | do_jit_extended_class_callbacks (Class *new_subclass) |
Calls registered JITs callbacks to notify that the given class was extended by new_class. | |
| bool | has_source_debug_extension () const |
Checks whether the given class has the SourceDebugExtension attribute. | |
| unsigned | get_source_debug_extension_length () const |
Gets length of the SourceDebugExtension attribute. | |
| const char * | get_source_debug_extension () const |
Gets data from the SourceDebugExtension attribute. | |
| void | set_verification_data (void *data) |
| Stores a verifier specific pointer into the given class. | |
| void * | get_verification_data () |
Gets a pointer to verifier specific data, previously stored with the call to set_verification_data. | |
| void | lock () |
| Locks access to the given class. | |
| void | unlock () |
| Unlocks access to the given class. | |
| void | instance_allocated (unsigned size) |
| Updates allocation statistics. | |
| void | instanceof_slow_path_taken () |
| Updates an instance of slow path statistics. | |
| void | class_thrown () |
Updates throwing statistics for java/lang/Throwable decendants. | |
| void * | code_alloc (size_t size, size_t alignment, Code_Allocation_Action action) |
| Allocates memory for code from pool of defining classloader for the class. | |
| void | initialization_checked () |
| Updates initialization check statistics. | |
| uint64 | get_times_allocated () const |
| Gets the number of times instance of the given class was allocated. | |
| uint64 | get_total_bytes_allocated () const |
| Gets the total number of bytes allocated for instances of the given class. | |
| uint64 | get_times_instanceof_slow_path_taken () const |
| Gets the number of times the slow path of the check instance was taken. | |
| uint64 | get_times_thrown () const |
| Gets the number of times the given class was thrown. | |
| uint64 | get_times_init_checked () const |
| Gets the number of times the initialization of the given class was checked by run-time helpers. | |
| uint64 | get_total_padding_bytes () const |
| Gets the number of excessive bytes used for aligning class fields. | |
Static Public Member Functions | |
| static size_t | get_offset_of_depth () |
| Gets offset of m_depth field in struct Class. | |
| static size_t | get_offset_of_fast_instanceof_flag () |
| Gets offset of m_is_suitable_for_fast_instanceof field in struct Class. | |
| static size_t | get_offset_of_class_init_checks () |
Gets an offset of m_num_class_init_checks in the class. | |
| static size_t | get_offset_of_array_element_class () |
Gets an offset of m_array_element_class in the class. | |
| static size_t | get_offset_of_jlc_handle () |
Gets an offset of m_class_handle in the class. | |
| static void * | helper_get_interface_vtable (ManagedObject *obj, Class *iid) |
Gets the interface vtable for interface iid within object obj. | |
Classes | |
| struct | Class_Super |
| struct | InnerClass |
| void Class.init_internals | ( | const Global_Env * | env, | |
| const String * | name, | |||
| ClassLoader * | cl | |||
| ) |
Initializes class-member variables to their initial values.
| [in] | env | - VM environment |
| [in] | name | - a class name to assign to the given class |
| [in] | cl | - a class loader for the given class |
| void Class.clear_internals | ( | ) |
Clears member variables within a class.
| bool Class.has_super_class | ( | ) | const |
Determines whether the given class has a super class.
true if the current class has a super class; otherwise false. | const String* Class.get_super_class_name | ( | ) | const |
Gets the name of the super class.
NULL, if the given class is java/lang/Object. get_super_class()->get_name() to retrieve the super class name. | Class* Class.get_super_class | ( | ) | const |
Gets the super class of the given class.
NULL, if the given class is java/lang/Object. | ClassLoader* Class.get_class_loader | ( | ) | const |
Gets the class loader of the given class.
| ManagedObject** Class.get_class_handle | ( | ) | const |
Gets the class handle of java.lang.Class for the given class.
java.lang.Class handle for the given class. | const String* Class.get_name | ( | ) | const |
Gets the natively interned class name for the given class.
| String* Class.get_java_name | ( | ) |
Gets a natively interned class name for the given class.
| String* Class.get_signature | ( | ) | const |
Gets a class signature.
| String* Class.get_simple_name | ( | ) |
Gets a simple name of the class.
| Package* Class.get_package | ( | ) | const |
Gets a package containing the given class.
| int Class.get_depth | ( | ) | const |
Gets depth in the hierarchy of the given class.
| bool Class.get_fast_instanceof_flag | ( | ) | const |
| VTable* Class.get_vtable | ( | ) | const |
Gets the vtable for the given class.
NULL, if the given class is an interface. | Allocation_Handle Class.get_allocation_handle | ( | ) | const |
Gets an allocation handle for the given class.
| size_t Class.get_source_file_name_length | ( | ) |
Gets the length of the source-file name.
| const char* Class.get_source_file_name | ( | ) |
Gets a source-file name.
| Method* Class.get_method_from_vtable | ( | unsigned | method_idx | ) | const |
Gets a method localed at method_idx in the m_vtable_descriptors table.
| method_idx | - index of method in vtable descriptors table |
| unsigned Class.get_number_of_virtual_method_entries | ( | ) | const |
Returns the number of virtual methods in vtable.
| Class* Class.get_first_child | ( | ) | const |
| Class* Class.get_next_sibling | ( | ) | const |
| static size_t Class.get_offset_of_depth | ( | ) | [static] |
| static size_t Class.get_offset_of_fast_instanceof_flag | ( | ) | [static] |
Gets offset of m_is_suitable_for_fast_instanceof field in struct Class.
| size_t Class.get_offset_of_fast_allocation_flag | ( | ) |
Gets an offset of m_is_fast_allocation_possible in the class.
| size_t Class.get_offset_of_allocation_handle | ( | ) |
Gets an offset of m_allocation_handle in the class.
| size_t Class.get_offset_of_instance_data_size | ( | ) |
Gets an offset of m_instance_data_size in the class.
| static size_t Class.get_offset_of_class_init_checks | ( | ) | [static] |
Gets an offset of m_num_class_init_checks in the class.
| static size_t Class.get_offset_of_array_element_class | ( | ) | [static] |
Gets an offset of m_array_element_class in the class.
| static size_t Class.get_offset_of_jlc_handle | ( | ) | [static] |
Gets an offset of m_class_handle in the class.
| unsigned char Class.get_number_of_dimensions | ( | ) | const |
Gets the number of array dimensions.
| Class* Class.get_array_base_class | ( | ) | const |
Gets the base class of the array (for non-primitive arrays only).
| Class* Class.get_array_element_class | ( | ) | const |
Gets the class of the array element.
| TypeDesc* Class.get_array_element_type_desc | ( | ) | const |
Gets the array-element type descriptor.
| Class_State Class.get_state | ( | ) | const |
Gets the class state.
| uint16 Class.get_number_of_superinterfaces | ( | ) | const |
Gets a number of superinterfaces.
| const String* Class.get_superinterface_name | ( | uint16 | index | ) | const |
Gets a super-interface name from the array of super-interfaces that the given class implements.
| [in] | index | - an index of super-interface to return the name for |
| Class* Class.get_superinterface | ( | uint16 | index | ) | const |
Gets a superinterface from the array of superinterfaces the given class implements.
| [in] | index | - an index of a superinterface to return |
| ConstantPool& Class.get_constant_pool | ( | ) |
Gets a constant pool of the given class.
| uint16 Class.get_number_of_fields | ( | ) | const |
Gets a number of fields in the given class.
| uint16 Class.get_number_of_static_fields | ( | ) | const |
Gets a number of static fields in the given class.
| Field* Class.get_field | ( | uint16 | index | ) | const |
Gets a field from the given class by its position in the class-fields array.
| [in] | index | - an index in the class-fields array of a field to retrieve |
| void* Class.get_static_data_address | ( | ) | const |
Gets an address of the memory block containing static data of the given class.
| uint16 Class.get_number_of_methods | ( | ) | const |
Gets a number of methods in the given class.
| Method* Class.get_method | ( | uint16 | index | ) | const |
Gets a method from the given class by its position in the class-method array.
| [in] | index | - an index in the class-method array of a method to retrieve |
| uint16 Class.get_declaring_class_index | ( | ) | const |
Gets a constant-pool index of the declaring class.
| uint16 Class.get_enclosing_class_index | ( | ) | const |
Gets a constant-pool index of the enclosing class.
| uint16 Class.get_enclosing_method_index | ( | ) | const |
Gets a constant-pool index of the enclosing method.
| uint16 Class.get_number_of_inner_classes | ( | ) | const |
Gets a number of inner classes.
| uint16 Class.get_inner_class_index | ( | uint16 | index | ) | const |
Gets an index in the constant pool of the given class, which describes the inner class.
| [in] | index | - an index of the inner class in the array of inner classes in the given class |
| uint16 Class.get_inner_class_access_flags | ( | uint16 | index | ) | const |
Gets access flags for the inner class.
| [in] | index | - an index of the inner class in the array of inner classes in the given class |
| AnnotationTable* Class.get_annotations | ( | ) | const |
Gets a collection of annotations.
| AnnotationTable* Class.get_invisible_annotations | ( | ) | const |
Gets a collection of invisible annotations.
| unsigned int Class.get_allocated_size | ( | ) | const |
Gets a class instance size.
| unsigned int Class.get_instance_data_size | ( | ) | const |
| unsigned int Class.get_array_element_size | ( | ) | const |
Gets the array-alement size.
| unsigned Class.get_id | ( | ) | const |
Gets the class ID.
| uint16 Class.get_version | ( | ) | const |
Gets major version of class file.
| uint16 Class.get_access_flags | ( | ) | const |
Gets access and properties flags of the given class.
| bool Class.is_primitive | ( | ) | const |
Checks whether the given class represents the primitive type.
true if the class is primitive; otherwise false. | bool Class.is_array | ( | ) | const |
Checks whether the given class represents an array.
true if the given class is an array, otherwise false. | bool Class.is_array_of_primitives | ( | ) | const |
Checks whether the base class of the given array is primitive.
true if the base class is primitive, otherwise false. | bool Class.is_public | ( | ) | const |
Checks whether the class has the ACC_PUBLIC flag set.
true if the class has the ACC_PUBLIC access flag set. | bool Class.is_private | ( | ) | const |
Checks whether the class has the ACC_PUBLIC flag set.
true if the class has the ACC_PUBLIC access flag set. | bool Class.is_protected | ( | ) | const |
Checks whether the class has the ACC_PUBLIC flag set.
true if the class has the ACC_PUBLIC access flag set. | bool Class.is_final | ( | ) | const |
Checks whether the class has the ACC_FINAL flag set.
true if the class has the ACC_FINAL access flag set. | bool Class.is_super | ( | ) | const |
Checks whether the class has the ACC_SUPER flag set.
true if the class has the ACC_SUPER access flag set. | bool Class.is_interface | ( | ) | const |
Checks whether the class has the ACC_INTERFACE flag set.
true if the class has the ACC_INTERFACE access flag set. | bool Class.is_abstract | ( | ) | const |
Checks whether the class has the ACC_ABSTRACT flag set.
true if the class has the ACC_ABSTRACT access flag set. | bool Class.is_enum | ( | ) | const |
Checks whether the class is enum, that is the ACC_ENUM flag is set.
true if the class is enum. | bool Class.is_synthetic | ( | ) | const |
Checks whether the class has the ACC_SYNTHETIC flag set.
true if the class has the ACC_SYNTHETIC access flag set. | bool Class.is_annotation | ( | ) | const |
Checks whether the class is an annotation.
true if the class is an annotation. | bool Class.has_finalizer | ( | ) | const |
Checks whether the given class has a finalizer.
true if the given class (or its super class) has a finalize method; otherwise false. | bool Class.is_inner_class | ( | ) | const |
Checks whether the given class is an inner class of some other class.
true if the given class is an inner class of some other class, otherwise false. | bool Class.can_access_inner_class | ( | Global_Env * | env, | |
| Class * | inner_class | |||
| ) |
Checks whether the given class can access inner_class.
| [in] | env | - VM environment |
| [in] | inner_class | - an inner class to check access to |
true if the given class has access to the inner class; otherwise false. | bool Class.can_access_member | ( | Class_Member * | member | ) |
Checks whether the given class can access a member class.
| [in] | member | - a class member to check access to |
true if the given class can access a member class; otherwise false. | bool Class.has_source_information | ( | ) | const |
Checks whether the given class has a source-file name available.
true if source file name is available for the given class; otherwise false. | bool Class.is_initializing | ( | ) | const |
Checks whether the given class is in the process of initialization.
true if the class initialization method is executed; otherwise false. | bool Class.is_initialized | ( | ) | const |
Checks whether the class is initialized.
true if the class is initialized; otherwise false. | bool Class.in_error | ( | ) | const |
Checks whether the class is in the error state.
true if the class is in the error state; otherwise false. | bool Class.is_at_least_prepared | ( | ) | const |
Checks whether the given class has a passed preparation stage.
true if the class has a passed preparation stage; otherwise false. | bool Class.is_instanceof | ( | Class * | clss | ) |
Checks whether the given class represents a class that is a subtype of clss, according to the Java instance of rules.
| [in] | clss | - a class to check for being super relative |
true if the given class represents a class that is a subtype of clss, otherwise false. | void Class.set_class_file_name | ( | const char * | cf_name | ) |
FIXME: all setter functions must be rethought to become private or to be removed altogether, if possible.
Sets the name of a file from which the given class has been loaded.
| [in] | cf_name | - a class-file name |
| void Class.set_instance_data_size_constraint_bit | ( | ) |
Sets instance data size constraint bit to let the allocation know there are constraints on the way instance should be allocated.
class_properties field of the class VTable. | void Class.set_class_handle | ( | ManagedObject ** | oh | ) |
Sets a class handle of java.lang.Class for the given class.
| [in] | oh | - a class handle of java.lang.Class |
| bool Class.parse | ( | Global_Env * | env, | |
| ByteReader & | cfs | |||
| ) |
Constructs internal representation of a class from the byte array (defines class).
| [in] | env | - VM environment |
| [in] | cfs | - a class-file stream; byte array contaning class data |
| bool Class.load_ancestors | ( | Global_Env * | env | ) |
Loads a super class and super interfaces of the given class.
The given class's class loader is used for it.
| [in] | env | - VM environment |
| bool Class.verify | ( | const Global_Env * | env | ) |
Verifies bytecodes of the class.
| [in] | env | - VM environment |
true if bytecodes of a class were successfully verified; otherwise false. | bool Class.verify_constraints | ( | const Global_Env * | env | ) |
Verifies constraints for the given class collected during the bytecodes verification.
| [in] | env | - VM environment |
true if constraints successfully pass verification; otherwise false. | void Class.setup_as_primitive | ( | ClassLoader * | cl | ) |
Setups the given class as representing a primitive type.
| [in] | cl | - a class loader the given class belongs to |
cl is always a bootstrap class loader for primitive types. Retrieve the bootstrap class loader from VM environment here, not one level up the calling stack. | void Class.setup_as_array | ( | Global_Env * | env, | |
| unsigned char | num_dimensions, | |||
| bool | isArrayOfPrimitives, | |||
| Class * | baseClass, | |||
| Class * | elementClass | |||
| ) |
Sets up the given class as representing an array.
| [in] | env | - VM environment |
| [in] | num_dimentions | - a number of dimentions this array has |
| [in] | isArrayOfPrimitives | - does this array is an array of primitives |
| [in] | baseClass | - base class of this array; for example, for [[[Ljava/lang/String; base class is java/lang/String |
| [in] | elementClass | - class representing element of this array; for example, for [[I, element the class is [I |
baseClass and elementClass are the same. | bool Class.prepare | ( | Global_Env * | env | ) |
Prepares a class:.
| [in] | env | - vm environment |
true if the class was successfully prepared; otherwise false. | Class* Class._resolve_class | ( | Global_Env * | env, | |
| unsigned | cp_index | |||
| ) |
Resolves a constant-pool entry to a class.
Loads a class if neccessary.
| [in] | env | - VM environment |
| [in] | cp_index | - a constant-pool index of CONSTANT_Class to resolve |
NULL. | Class* Class.resolve_declaring_class | ( | Global_Env * | env | ) |
Resolves a declaring class.
NULL. | Field* Class._resolve_field | ( | Global_Env * | env, | |
| unsigned | cp_index | |||
| ) |
Resolves a field in the constant pool of the given class.
| [in] | env | - VM environment |
| [in] | cp_index | - an index of an entry in the constant pool, which describes field to be resolved |
NULL. | Method* Class._resolve_method | ( | Global_Env * | env, | |
| unsigned | cp_index | |||
| ) |
Resolves a method in the constant pool of the given class.
| [in] | env | - VM environment |
| [in] | cp_index | - an index of an entry in the constant pool, which describes method to be resolved |
NULL. | void Class.initialize | ( | ) |
Initializes the class.
| [in] | throw_exception | - defines whether the exception should be thrown or raised |
Looks up the field with specified name and descriptor in the given class only.
| [in] | name | - the field name to look up for |
| [in] | desc | - the field descriptor to look up for |
NULL. Looks up the field with specified name and descriptor in the given class and also in the super class and super-interfaces recursively.
| [in] | name | - field name to look up for |
| [in] | desc | - field descriptor to look up for |
NULL otherwise Looks up a method with a specified name and descriptor in the given class only.
| [in] | name | - a method name to look up for |
| [in] | desc | - a method descriptor to look up for |
NULL. | ManagedObject* Class.allocate_instance | ( | ) |
Allocates an instance of the given class and returns a pointer to it.
NULL, if no memory is available and OutOfMemoryError exception is raised on a caller thread. | unsigned Class.calculate_array_size | ( | int | length | ) | const |
Calculates a size of the block allocated for the array, which is represented by the given class.
| [in] | length | the length of the array |
| unsigned Class.calculate_size | ( | ) |
Estimates the amount of memory allocated for C++ part of the given class.
| static void* Class.helper_get_interface_vtable | ( | ManagedObject * | obj, | |
| Class * | iid | |||
| ) | [static] |
Gets the interface vtable for interface iid within object obj.
| [in] | obj | - an object to retrieve an interface table entry from |
| [in] | iid | - an interface class to retrieve vtable for |
NULL, if no such interface exists for the object. | void Class.register_jit_extended_class_callback | ( | JIT * | jit_to_be_notified, | |
| void * | callback_data | |||
| ) |
Registers a callback that is called to notify the given JIT whenever the given class is extended.
The callback_data pointer will be passed back to the JIT during the callback. The JIT's callback function is JIT_extended_class_callback.
| [in] | jit_to_be_notified | - JIT to notify on extending the class |
| [in] | callback_data | - data to be passed back to JIT, when the callback is called |
| void Class.do_jit_extended_class_callbacks | ( | Class * | new_subclass | ) |
Calls registered JITs callbacks to notify that the given class was extended by new_class.
| [in] | new_subclass | - a subclass extending the given class |
| bool Class.has_source_debug_extension | ( | ) | const |
Checks whether the given class has the SourceDebugExtension attribute.
true if the SourceDebugExtension attribute is available for the given class; otherwise false. | unsigned Class.get_source_debug_extension_length | ( | ) | const |
Gets length of the SourceDebugExtension attribute.
SourceDebugExtension attribute length. | const char* Class.get_source_debug_extension | ( | ) | const |
Gets data from the SourceDebugExtension attribute.
SourceDebugExtension attribute bytes. | void Class.set_verification_data | ( | void * | data | ) |
Stores a verifier specific pointer into the given class.
| [in] | data | - a verifier specific data pointer |
| void* Class.get_verification_data | ( | ) |
Gets a pointer to verifier specific data, previously stored with the call to set_verification_data.
NULL, if none was set. | void Class.lock | ( | ) |
Locks access to the given class.
| void Class.unlock | ( | ) |
Unlocks access to the given class.
| void Class.instance_allocated | ( | unsigned | size | ) |
Updates allocation statistics.
| [in] | size | - a size of an allocated instance |
| void Class.instanceof_slow_path_taken | ( | ) |
Updates an instance of slow path statistics.
| void Class.class_thrown | ( | ) |
Updates throwing statistics for java/lang/Throwable decendants.
| void* Class.code_alloc | ( | size_t | size, | |
| size_t | alignment, | |||
| Code_Allocation_Action | action | |||
| ) |
Allocates memory for code from pool of defining classloader for the class.
| void Class.initialization_checked | ( | ) |
Updates initialization check statistics.
| uint64 Class.get_times_allocated | ( | ) | const |
Gets the number of times instance of the given class was allocated.
| uint64 Class.get_total_bytes_allocated | ( | ) | const |
Gets the total number of bytes allocated for instances of the given class.
| uint64 Class.get_times_instanceof_slow_path_taken | ( | ) | const |
Gets the number of times the slow path of the check instance was taken.
| uint64 Class.get_times_thrown | ( | ) | const |
Gets the number of times the given class was thrown.
| uint64 Class.get_times_init_checked | ( | ) | const |
Gets the number of times the initialization of the given class was checked by run-time helpers.
| uint64 Class.get_total_padding_bytes | ( | ) | const |
Gets the number of excessive bytes used for aligning class fields.
Genereated on Tue Mar 11 19:26:00 2008 by Doxygen.
(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.