hotspot/src/share/vm/oops/instanceKlass.hpp
changeset 2332 5c7b6f4ce0a1
parent 1550 be2fc37a817f
child 2343 6113864ecd70
equal deleted inserted replaced
2259:d3c946e7f127 2332:5c7b6f4ce0a1
     1 /*
     1 /*
     2  * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2  * Copyright 1997-2009 Sun Microsystems, Inc.  All Rights Reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   306   // package
   306   // package
   307   bool is_same_class_package(klassOop class2);
   307   bool is_same_class_package(klassOop class2);
   308   bool is_same_class_package(oop classloader2, symbolOop classname2);
   308   bool is_same_class_package(oop classloader2, symbolOop classname2);
   309   static bool is_same_class_package(oop class_loader1, symbolOop class_name1, oop class_loader2, symbolOop class_name2);
   309   static bool is_same_class_package(oop class_loader1, symbolOop class_name1, oop class_loader2, symbolOop class_name2);
   310 
   310 
       
   311   // find an enclosing class (defined where original code was, in jvm.cpp!)
       
   312   klassOop compute_enclosing_class(symbolOop& simple_name_result, TRAPS) {
       
   313     instanceKlassHandle self(THREAD, this->as_klassOop());
       
   314     return compute_enclosing_class_impl(self, simple_name_result, THREAD);
       
   315   }
       
   316   static klassOop compute_enclosing_class_impl(instanceKlassHandle self,
       
   317                                                symbolOop& simple_name_result, TRAPS);
       
   318 
       
   319   // tell if two classes have the same enclosing class (at package level)
       
   320   bool is_same_package_member(klassOop class2, TRAPS) {
       
   321     instanceKlassHandle self(THREAD, this->as_klassOop());
       
   322     return is_same_package_member_impl(self, class2, THREAD);
       
   323   }
       
   324   static bool is_same_package_member_impl(instanceKlassHandle self,
       
   325                                           klassOop class2, TRAPS);
       
   326 
   311   // initialization state
   327   // initialization state
   312   bool is_loaded() const                   { return _init_state >= loaded; }
   328   bool is_loaded() const                   { return _init_state >= loaded; }
   313   bool is_linked() const                   { return _init_state >= linked; }
   329   bool is_linked() const                   { return _init_state >= linked; }
   314   bool is_initialized() const              { return _init_state == fully_initialized; }
   330   bool is_initialized() const              { return _init_state == fully_initialized; }
   315   bool is_not_initialized() const          { return _init_state <  being_initialized; }
   331   bool is_not_initialized() const          { return _init_state <  being_initialized; }