239 static Klass* resolve_or_fail(Symbol* class_name, Handle class_loader, Handle protection_domain, bool throw_error, TRAPS); |
239 static Klass* resolve_or_fail(Symbol* class_name, Handle class_loader, Handle protection_domain, bool throw_error, TRAPS); |
240 // Convenient call for null loader and protection domain. |
240 // Convenient call for null loader and protection domain. |
241 static Klass* resolve_or_fail(Symbol* class_name, bool throw_error, TRAPS); |
241 static Klass* resolve_or_fail(Symbol* class_name, bool throw_error, TRAPS); |
242 protected: |
242 protected: |
243 // handle error translation for resolve_or_null results |
243 // handle error translation for resolve_or_null results |
244 static Klass* handle_resolution_exception(Symbol* class_name, Handle class_loader, Handle protection_domain, bool throw_error, KlassHandle klass_h, TRAPS); |
244 static Klass* handle_resolution_exception(Symbol* class_name, bool throw_error, KlassHandle klass_h, TRAPS); |
245 |
245 |
246 public: |
246 public: |
247 |
247 |
248 // Returns a class with a given class name and class loader. |
248 // Returns a class with a given class name and class loader. |
249 // Loads the class if needed. If not found NULL is returned. |
249 // Loads the class if needed. If not found NULL is returned. |
547 InstanceKlass::cast((loader_data->class_loader())->klass())->name()->as_C_string() ); |
547 InstanceKlass::cast((loader_data->class_loader())->klass())->name()->as_C_string() ); |
548 } |
548 } |
549 |
549 |
550 // Record the error when the first attempt to resolve a reference from a constant |
550 // Record the error when the first attempt to resolve a reference from a constant |
551 // pool entry to a class fails. |
551 // pool entry to a class fails. |
552 static void add_resolution_error(constantPoolHandle pool, int which, Symbol* error); |
552 static void add_resolution_error(constantPoolHandle pool, int which, Symbol* error, |
|
553 Symbol* message); |
553 static void delete_resolution_error(ConstantPool* pool); |
554 static void delete_resolution_error(ConstantPool* pool); |
554 static Symbol* find_resolution_error(constantPoolHandle pool, int which); |
555 static Symbol* find_resolution_error(constantPoolHandle pool, int which, |
|
556 Symbol** message); |
555 |
557 |
556 protected: |
558 protected: |
557 |
559 |
558 enum Constants { |
560 enum Constants { |
559 _loader_constraint_size = 107, // number of entries in constraint table |
561 _loader_constraint_size = 107, // number of entries in constraint table |