src/share/vm/classfile/systemDictionary.hpp

Print this page
rev 3 : [mq]: anonk.patch


 206   static klassOop resolve_or_null(symbolHandle class_name, Handle class_loader, Handle protection_domain, TRAPS);
 207   // Version with null loader and protection domain
 208   static klassOop resolve_or_null(symbolHandle class_name, TRAPS);
 209 
 210   // Resolve a superclass or superinterface. Called from ClassFileParser,
 211   // parse_interfaces, resolve_instance_class_or_null, load_shared_class
 212   // "child_name" is the class whose super class or interface is being resolved.
 213   static klassOop resolve_super_or_fail(symbolHandle child_name,
 214                                         symbolHandle class_name,
 215                                         Handle class_loader,
 216                                         Handle protection_domain,
 217                                         bool is_superclass,
 218                                         TRAPS);
 219 
 220   // Parse new stream. This won't update the system dictionary or
 221   // class hierarchy, simply parse the stream. Used by JVMTI RedefineClasses.
 222   static klassOop parse_stream(symbolHandle class_name,
 223                                Handle class_loader,
 224                                Handle protection_domain,
 225                                ClassFileStream* st,










 226                                TRAPS);
 227 
 228   // Resolve from stream (called by jni_DefineClass and JVM_DefineClass)
 229   static klassOop resolve_from_stream(symbolHandle class_name, Handle class_loader, Handle protection_domain, ClassFileStream* st, TRAPS);
 230 
 231   // Lookup an already loaded class. If not found NULL is returned.
 232   static klassOop find(symbolHandle class_name, Handle class_loader, Handle protection_domain, TRAPS);
 233 
 234   // Lookup an already loaded instance or array class.
 235   // Do not make any queries to class loaders; consult only the cache.
 236   // If not found NULL is returned.
 237   static klassOop find_instance_or_array_klass(symbolHandle class_name,
 238                                                Handle class_loader,
 239                                                Handle protection_domain,
 240                                                TRAPS);
 241 
 242   // If the given name is known to vmSymbols, return the well-know klass:
 243   static klassOop find_well_known_klass(symbolOop class_name);
 244 
 245   // Lookup an instance or array class that has already been loaded


 365     // despite the optional loading, if you use this it must be present:
 366     return check_klass(k);
 367   }
 368 
 369   static bool initialize_wk_klass(WKID id, bool must_load, TRAPS);
 370   static void initialize_wk_klasses_until(WKID limit_id, WKID &start_id, TRAPS);
 371   static void initialize_wk_klasses_through(WKID end_id, WKID &start_id, TRAPS) {
 372     int limit = (int)end_id + 1;
 373     initialize_wk_klasses_until((WKID) limit, start_id, THREAD);
 374   }
 375 
 376 public:
 377   #define WK_KLASS_DECLARE(name, ignore_symbol, option) \
 378     static klassOop name() { return check_klass_##option(_well_known_klasses[WK_KLASS_ENUM_NAME(name)]); }
 379   WK_KLASSES_DO(WK_KLASS_DECLARE);
 380   #undef WK_KLASS_DECLARE
 381 
 382   // Local definition for direct access to the private array:
 383   #define WK_KLASS(name) _well_known_klasses[WK_KLASS_ENUM_NAME(name)]
 384 


 385   static klassOop box_klass(BasicType t) {
 386     assert((uint)t < T_VOID+1, "range check");
 387     return check_klass(_box_klasses[t]);


 388   }
 389   static BasicType box_klass_type(klassOop k);  // inverse of box_klass
 390 
 391   // methods returning lazily loaded klasses
 392   // The corresponding method to load the class must be called before calling them.
 393   static klassOop abstract_ownable_synchronizer_klass() { return check_klass(_abstract_ownable_synchronizer_klass); }
 394 
 395   static void load_abstract_ownable_synchronizer_klass(TRAPS);
 396 
 397 private:
 398   // Tells whether ClassLoader.loadClassInternal is present
 399   static bool has_loadClassInternal()       { return _has_loadClassInternal; }
 400 
 401 public:
 402   // Tells whether ClassLoader.checkPackageAccess is present
 403   static bool has_checkPackageAccess()      { return _has_checkPackageAccess; }
 404 
 405   static bool class_klass_loaded()          { return WK_KLASS(class_klass) != NULL; }
 406   static bool cloneable_klass_loaded()      { return WK_KLASS(cloneable_klass) != NULL; }
 407 




 206   static klassOop resolve_or_null(symbolHandle class_name, Handle class_loader, Handle protection_domain, TRAPS);
 207   // Version with null loader and protection domain
 208   static klassOop resolve_or_null(symbolHandle class_name, TRAPS);
 209 
 210   // Resolve a superclass or superinterface. Called from ClassFileParser,
 211   // parse_interfaces, resolve_instance_class_or_null, load_shared_class
 212   // "child_name" is the class whose super class or interface is being resolved.
 213   static klassOop resolve_super_or_fail(symbolHandle child_name,
 214                                         symbolHandle class_name,
 215                                         Handle class_loader,
 216                                         Handle protection_domain,
 217                                         bool is_superclass,
 218                                         TRAPS);
 219 
 220   // Parse new stream. This won't update the system dictionary or
 221   // class hierarchy, simply parse the stream. Used by JVMTI RedefineClasses.
 222   static klassOop parse_stream(symbolHandle class_name,
 223                                Handle class_loader,
 224                                Handle protection_domain,
 225                                ClassFileStream* st,
 226                                TRAPS) {
 227     KlassHandle nullHandle;
 228     return parse_stream(class_name, class_loader, protection_domain, st, nullHandle, NULL, THREAD);
 229   }
 230   static klassOop parse_stream(symbolHandle class_name,
 231                                Handle class_loader,
 232                                Handle protection_domain,
 233                                ClassFileStream* st,
 234                                KlassHandle host_klass,
 235                                GrowableArray<Handle>* cp_patches,
 236                                TRAPS);
 237 
 238   // Resolve from stream (called by jni_DefineClass and JVM_DefineClass)
 239   static klassOop resolve_from_stream(symbolHandle class_name, Handle class_loader, Handle protection_domain, ClassFileStream* st, TRAPS);
 240 
 241   // Lookup an already loaded class. If not found NULL is returned.
 242   static klassOop find(symbolHandle class_name, Handle class_loader, Handle protection_domain, TRAPS);
 243 
 244   // Lookup an already loaded instance or array class.
 245   // Do not make any queries to class loaders; consult only the cache.
 246   // If not found NULL is returned.
 247   static klassOop find_instance_or_array_klass(symbolHandle class_name,
 248                                                Handle class_loader,
 249                                                Handle protection_domain,
 250                                                TRAPS);
 251 
 252   // If the given name is known to vmSymbols, return the well-know klass:
 253   static klassOop find_well_known_klass(symbolOop class_name);
 254 
 255   // Lookup an instance or array class that has already been loaded


 375     // despite the optional loading, if you use this it must be present:
 376     return check_klass(k);
 377   }
 378 
 379   static bool initialize_wk_klass(WKID id, bool must_load, TRAPS);
 380   static void initialize_wk_klasses_until(WKID limit_id, WKID &start_id, TRAPS);
 381   static void initialize_wk_klasses_through(WKID end_id, WKID &start_id, TRAPS) {
 382     int limit = (int)end_id + 1;
 383     initialize_wk_klasses_until((WKID) limit, start_id, THREAD);
 384   }
 385 
 386 public:
 387   #define WK_KLASS_DECLARE(name, ignore_symbol, option) \
 388     static klassOop name() { return check_klass_##option(_well_known_klasses[WK_KLASS_ENUM_NAME(name)]); }
 389   WK_KLASSES_DO(WK_KLASS_DECLARE);
 390   #undef WK_KLASS_DECLARE
 391 
 392   // Local definition for direct access to the private array:
 393   #define WK_KLASS(name) _well_known_klasses[WK_KLASS_ENUM_NAME(name)]
 394 
 395   // Return Integer for T_INT, etc.
 396   // Return NULL if t is not a boxable primitive type, such as T_OBJECT or T_ILLEGAL.
 397   static klassOop box_klass(BasicType t) {
 398     if ((uint)t <= T_VOID)
 399       return _box_klasses[t];
 400     else
 401       return NULL;
 402   }
 403   static BasicType box_klass_type(klassOop k);  // inverse of box_klass
 404 
 405   // methods returning lazily loaded klasses
 406   // The corresponding method to load the class must be called before calling them.
 407   static klassOop abstract_ownable_synchronizer_klass() { return check_klass(_abstract_ownable_synchronizer_klass); }
 408 
 409   static void load_abstract_ownable_synchronizer_klass(TRAPS);
 410 
 411 private:
 412   // Tells whether ClassLoader.loadClassInternal is present
 413   static bool has_loadClassInternal()       { return _has_loadClassInternal; }
 414 
 415 public:
 416   // Tells whether ClassLoader.checkPackageAccess is present
 417   static bool has_checkPackageAccess()      { return _has_checkPackageAccess; }
 418 
 419   static bool class_klass_loaded()          { return WK_KLASS(class_klass) != NULL; }
 420   static bool cloneable_klass_loaded()      { return WK_KLASS(cloneable_klass) != NULL; }
 421