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. |
309 // package |
309 // package |
310 bool is_same_class_package(klassOop class2); |
310 bool is_same_class_package(klassOop class2); |
311 bool is_same_class_package(oop classloader2, symbolOop classname2); |
311 bool is_same_class_package(oop classloader2, symbolOop classname2); |
312 static bool is_same_class_package(oop class_loader1, symbolOop class_name1, oop class_loader2, symbolOop class_name2); |
312 static bool is_same_class_package(oop class_loader1, symbolOop class_name1, oop class_loader2, symbolOop class_name2); |
313 |
313 |
|
314 // find an enclosing class (defined where original code was, in jvm.cpp!) |
|
315 klassOop compute_enclosing_class(symbolOop& simple_name_result, TRAPS) { |
|
316 instanceKlassHandle self(THREAD, this->as_klassOop()); |
|
317 return compute_enclosing_class_impl(self, simple_name_result, THREAD); |
|
318 } |
|
319 static klassOop compute_enclosing_class_impl(instanceKlassHandle self, |
|
320 symbolOop& simple_name_result, TRAPS); |
|
321 |
|
322 // tell if two classes have the same enclosing class (at package level) |
|
323 bool is_same_package_member(klassOop class2, TRAPS) { |
|
324 instanceKlassHandle self(THREAD, this->as_klassOop()); |
|
325 return is_same_package_member_impl(self, class2, THREAD); |
|
326 } |
|
327 static bool is_same_package_member_impl(instanceKlassHandle self, |
|
328 klassOop class2, TRAPS); |
|
329 |
314 // initialization state |
330 // initialization state |
315 bool is_loaded() const { return _init_state >= loaded; } |
331 bool is_loaded() const { return _init_state >= loaded; } |
316 bool is_linked() const { return _init_state >= linked; } |
332 bool is_linked() const { return _init_state >= linked; } |
317 bool is_initialized() const { return _init_state == fully_initialized; } |
333 bool is_initialized() const { return _init_state == fully_initialized; } |
318 bool is_not_initialized() const { return _init_state < being_initialized; } |
334 bool is_not_initialized() const { return _init_state < being_initialized; } |