src/share/vm/ci/ciInstanceKlass.hpp

Print this page




   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 









  25 // ciInstanceKlass
  26 //
  27 // This class represents a klassOop in the HotSpot virtual machine
  28 // whose Klass part is an instanceKlass.  It may or may not
  29 // be loaded.
  30 class ciInstanceKlass : public ciKlass {
  31   CI_PACKAGE_ACCESS
  32   friend class ciBytecodeStream;
  33   friend class ciEnv;
  34   friend class ciExceptionHandler;
  35   friend class ciMethod;
  36   friend class ciField;
  37 
  38 private:
  39   jobject                _loader;
  40   jobject                _protection_domain;
  41 
  42   instanceKlass::ClassState _init_state;           // state of class
  43   bool                   _is_shared;
  44   bool                   _has_finalizer;


 198   // but consider adding to vmSymbols.hpp instead.
 199 
 200   bool is_leaf_type();
 201   ciInstanceKlass* implementor(int n);
 202 
 203   // Is the defining class loader of this class the default loader?
 204   bool uses_default_loader();
 205 
 206   bool is_java_lang_Object();
 207 
 208   // Is this klass in the given package?
 209   bool is_in_package(const char* packagename) {
 210     return is_in_package(packagename, (int) strlen(packagename));
 211   }
 212   bool is_in_package(const char* packagename, int len);
 213 
 214   // What kind of ciObject is this?
 215   bool is_instance_klass() { return true; }
 216   bool is_java_klass()     { return true; }
 217 };




   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_CI_CIINSTANCEKLASS_HPP
  26 #define SHARE_VM_CI_CIINSTANCEKLASS_HPP
  27 
  28 #include "ci/ciConstantPoolCache.hpp"
  29 #include "ci/ciFlags.hpp"
  30 #include "ci/ciInstanceKlassKlass.hpp"
  31 #include "ci/ciKlass.hpp"
  32 #include "ci/ciSymbol.hpp"
  33 
  34 // ciInstanceKlass
  35 //
  36 // This class represents a klassOop in the HotSpot virtual machine
  37 // whose Klass part is an instanceKlass.  It may or may not
  38 // be loaded.
  39 class ciInstanceKlass : public ciKlass {
  40   CI_PACKAGE_ACCESS
  41   friend class ciBytecodeStream;
  42   friend class ciEnv;
  43   friend class ciExceptionHandler;
  44   friend class ciMethod;
  45   friend class ciField;
  46 
  47 private:
  48   jobject                _loader;
  49   jobject                _protection_domain;
  50 
  51   instanceKlass::ClassState _init_state;           // state of class
  52   bool                   _is_shared;
  53   bool                   _has_finalizer;


 207   // but consider adding to vmSymbols.hpp instead.
 208 
 209   bool is_leaf_type();
 210   ciInstanceKlass* implementor(int n);
 211 
 212   // Is the defining class loader of this class the default loader?
 213   bool uses_default_loader();
 214 
 215   bool is_java_lang_Object();
 216 
 217   // Is this klass in the given package?
 218   bool is_in_package(const char* packagename) {
 219     return is_in_package(packagename, (int) strlen(packagename));
 220   }
 221   bool is_in_package(const char* packagename, int len);
 222 
 223   // What kind of ciObject is this?
 224   bool is_instance_klass() { return true; }
 225   bool is_java_klass()     { return true; }
 226 };
 227 
 228 #endif // SHARE_VM_CI_CIINSTANCEKLASS_HPP