src/share/vm/runtime/handles.hpp

changeset 1100
c89f86385056
parent 435
a61af66fc99e
child 1907
c18cbe5936b8
equal deleted inserted replaced
1082:bd441136a5ce 1100:c89f86385056
1 /* 1 /*
2 * Copyright 1997-2007 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.
133 assert(SharedSkipVerify || is_null() || obj->is_klass(), "not a klassOop"); 133 assert(SharedSkipVerify || is_null() || obj->is_klass(), "not a klassOop");
134 } 134 }
135 KlassHandle (Thread *thread, Klass* kl) 135 KlassHandle (Thread *thread, Klass* kl)
136 : Handle(thread, kl ? kl->as_klassOop() : (klassOop)NULL) { 136 : Handle(thread, kl ? kl->as_klassOop() : (klassOop)NULL) {
137 assert(is_null() || obj()->is_klass(), "not a klassOop"); 137 assert(is_null() || obj()->is_klass(), "not a klassOop");
138 }
139
140 // Direct interface, use very sparingly.
141 // Used by SystemDictionaryHandles to create handles on existing WKKs.
142 // The obj of such a klass handle may be null, because the handle is formed
143 // during system bootstrapping.
144 KlassHandle(klassOop *handle, bool dummy) : Handle((oop*)handle, dummy) {
145 assert(SharedSkipVerify || is_null() || obj() == NULL || obj()->is_klass(), "not a klassOop");
138 } 146 }
139 147
140 // General access 148 // General access
141 klassOop operator () () const { return obj(); } 149 klassOop operator () () const { return obj(); }
142 Klass* operator -> () const { return as_klass(); } 150 Klass* operator -> () const { return as_klass(); }

mercurial