hotspot/src/share/vm/runtime/handles.hpp
changeset 2332 5c7b6f4ce0a1
parent 1 489c9b5090e2
child 5547 f4b087cbb361
equal deleted inserted replaced
2259:d3c946e7f127 2332:5c7b6f4ce0a1
     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(); }