1 /*
2 * Copyright (c) 1997, 2007, 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 *
23 */
24
25 // arrayKlass is the abstract baseclass for all array classes
26
27 class arrayKlass: public Klass {
28 friend class VMStructs;
29 private:
30 int _dimension; // This is n'th-dimensional array.
31 klassOop _higher_dimension; // Refers the (n+1)'th-dimensional array (if present).
32 klassOop _lower_dimension; // Refers the (n-1)'th-dimensional array (if present).
33 int _vtable_len; // size of vtable for this klass
34 juint _alloc_size; // allocation profiling support
35 oop _component_mirror; // component type, as a java/lang/Class
36
37 public:
38 // Testing operation
39 bool oop_is_array() const { return true; }
40
41 // Instance variables
42 int dimension() const { return _dimension; }
43 void set_dimension(int dimension) { _dimension = dimension; }
44
110 // Shared creation method
111 static arrayKlassHandle base_create_array_klass(
112 const Klass_vtbl& vtbl,
113 int header_size, KlassHandle klass,
114 TRAPS);
115 // Return a handle.
116 static void complete_create_array_klass(arrayKlassHandle k, KlassHandle super_klass, TRAPS);
117
118 // jvm support
119 jint compute_modifier_flags(TRAPS) const;
120
121 // JVMTI support
122 jint jvmti_class_status() const;
123
124 // Printing
125 void oop_print_on(oop obj, outputStream* st);
126
127 // Verification
128 void oop_verify_on(oop obj, outputStream* st);
129 };
|
1 /*
2 * Copyright (c) 1997, 2010, 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 *
23 */
24
25 #ifndef SHARE_VM_OOPS_ARRAYKLASS_HPP
26 #define SHARE_VM_OOPS_ARRAYKLASS_HPP
27
28 #include "memory/universe.hpp"
29 #include "oops/klass.hpp"
30 #include "oops/klassOop.hpp"
31 #include "oops/klassVtable.hpp"
32
33 // arrayKlass is the abstract baseclass for all array classes
34
35 class arrayKlass: public Klass {
36 friend class VMStructs;
37 private:
38 int _dimension; // This is n'th-dimensional array.
39 klassOop _higher_dimension; // Refers the (n+1)'th-dimensional array (if present).
40 klassOop _lower_dimension; // Refers the (n-1)'th-dimensional array (if present).
41 int _vtable_len; // size of vtable for this klass
42 juint _alloc_size; // allocation profiling support
43 oop _component_mirror; // component type, as a java/lang/Class
44
45 public:
46 // Testing operation
47 bool oop_is_array() const { return true; }
48
49 // Instance variables
50 int dimension() const { return _dimension; }
51 void set_dimension(int dimension) { _dimension = dimension; }
52
118 // Shared creation method
119 static arrayKlassHandle base_create_array_klass(
120 const Klass_vtbl& vtbl,
121 int header_size, KlassHandle klass,
122 TRAPS);
123 // Return a handle.
124 static void complete_create_array_klass(arrayKlassHandle k, KlassHandle super_klass, TRAPS);
125
126 // jvm support
127 jint compute_modifier_flags(TRAPS) const;
128
129 // JVMTI support
130 jint jvmti_class_status() const;
131
132 // Printing
133 void oop_print_on(oop obj, outputStream* st);
134
135 // Verification
136 void oop_verify_on(oop obj, outputStream* st);
137 };
138
139 #endif // SHARE_VM_OOPS_ARRAYKLASS_HPP
|