src/hotspot/share/oops/klass.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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  *


 632   ALL_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_DECL_BACKWARDS)
 633 #endif // INCLUDE_ALL_GCS
 634 
 635   virtual void array_klasses_do(void f(Klass* k)) {}
 636 
 637   // Return self, except for abstract classes with exactly 1
 638   // implementor.  Then return the 1 concrete implementation.
 639   Klass *up_cast_abstract();
 640 
 641   // klass name
 642   Symbol* name() const                   { return _name; }
 643   void set_name(Symbol* n);
 644 
 645  public:
 646   // jvm support
 647   virtual jint compute_modifier_flags(TRAPS) const;
 648 
 649   // JVMTI support
 650   virtual jint jvmti_class_status() const;
 651 


 652   // Printing
 653   virtual void print_on(outputStream* st) const;
 654 
 655   virtual void oop_print_value_on(oop obj, outputStream* st);
 656   virtual void oop_print_on      (oop obj, outputStream* st);
 657 
 658   virtual const char* internal_name() const = 0;
 659 
 660   // Verification
 661   virtual void verify_on(outputStream* st);
 662   void verify() { verify_on(tty); }
 663 
 664 #ifndef PRODUCT
 665   bool verify_vtable_index(int index);
 666   bool verify_itable_index(int index);
 667 #endif
 668 
 669   virtual void oop_verify_on(oop obj, outputStream* st);
 670 
 671   static bool is_null(narrowKlass obj);


   1 /*
   2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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  *


 632   ALL_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_DECL_BACKWARDS)
 633 #endif // INCLUDE_ALL_GCS
 634 
 635   virtual void array_klasses_do(void f(Klass* k)) {}
 636 
 637   // Return self, except for abstract classes with exactly 1
 638   // implementor.  Then return the 1 concrete implementation.
 639   Klass *up_cast_abstract();
 640 
 641   // klass name
 642   Symbol* name() const                   { return _name; }
 643   void set_name(Symbol* n);
 644 
 645  public:
 646   // jvm support
 647   virtual jint compute_modifier_flags(TRAPS) const;
 648 
 649   // JVMTI support
 650   virtual jint jvmti_class_status() const;
 651 
 652   static void ensure_klass_alive(oop o);
 653 
 654   // Printing
 655   virtual void print_on(outputStream* st) const;
 656 
 657   virtual void oop_print_value_on(oop obj, outputStream* st);
 658   virtual void oop_print_on      (oop obj, outputStream* st);
 659 
 660   virtual const char* internal_name() const = 0;
 661 
 662   // Verification
 663   virtual void verify_on(outputStream* st);
 664   void verify() { verify_on(tty); }
 665 
 666 #ifndef PRODUCT
 667   bool verify_vtable_index(int index);
 668   bool verify_itable_index(int index);
 669 #endif
 670 
 671   virtual void oop_verify_on(oop obj, outputStream* st);
 672 
 673   static bool is_null(narrowKlass obj);