ciTypeArrayKlass.hpp revision 5776:de6a9e811145
1139749Simp/* 2196008Smjacob * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 3167403Smjacob * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4196008Smjacob * 5167403Smjacob * This code is free software; you can redistribute it and/or modify it 6167403Smjacob * under the terms of the GNU General Public License version 2 only, as 7167403Smjacob * published by the Free Software Foundation. 8196008Smjacob * 9167403Smjacob * This code is distributed in the hope that it will be useful, but WITHOUT 10167403Smjacob * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11167403Smjacob * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12167403Smjacob * version 2 for more details (a copy is included in the LICENSE file that 13167403Smjacob * accompanied this code). 14196008Smjacob * 15167403Smjacob * You should have received a copy of the GNU General Public License version 16167403Smjacob * 2 along with this work; if not, write to the Free Software Foundation, 17167403Smjacob * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18167403Smjacob * 19167403Smjacob * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20167403Smjacob * or visit www.oracle.com if you need additional information or have any 21167403Smjacob * questions. 22167403Smjacob * 23167403Smjacob */ 24167403Smjacob 25167403Smjacob#ifndef SHARE_VM_CI_CITYPEARRAYKLASS_HPP 26196008Smjacob#define SHARE_VM_CI_CITYPEARRAYKLASS_HPP 27167403Smjacob 28167403Smjacob#include "ci/ciArrayKlass.hpp" 2955373Smjacob 3055373Smjacob// ciTypeArrayKlass 3155373Smjacob// 3290224Smjacob// This class represents a Klass* in the HotSpot virtual machine 3390224Smjacob// whose Klass part in a TypeArrayKlass. 3490224Smjacobclass ciTypeArrayKlass : public ciArrayKlass { 3590224Smjacob CI_PACKAGE_ACCESS 3655373Smjacob 3755373Smjacobprotected: 3855373Smjacob ciTypeArrayKlass(KlassHandle h_k); 3955373Smjacob 4055373Smjacob TypeArrayKlass* get_TypeArrayKlass() { 4155373Smjacob return (TypeArrayKlass*)get_Klass(); 4255373Smjacob } 43160410Smjacob 44160410Smjacob const char* type_string() { return "ciTypeArrayKlass"; } 4555373Smjacob 4655373Smjacob // Helper method for make. 4755373Smjacob static ciTypeArrayKlass* make_impl(BasicType type); 4855373Smjacob 4955373Smjacobpublic: 5055373Smjacob // The type of the array elements. 5155373Smjacob BasicType element_type() { 5255373Smjacob return Klass::layout_helper_element_type(layout_helper()); 5355373Smjacob } 5455373Smjacob 55291512Smav // What kind of ciObject is this? 56291512Smav bool is_type_array_klass() const { return true; } 57196008Smjacob 5855373Smjacob // Make an array klass corresponding to the specified primitive type. 59157943Smjacob static ciTypeArrayKlass* make(BasicType type); 60163899Smjacob 61157943Smjacob virtual ciKlass* exact_klass() { 62157943Smjacob return this; 63163899Smjacob } 64196008Smjacob}; 6555373Smjacob 6655373Smjacob#endif // SHARE_VM_CI_CITYPEARRAYKLASS_HPP 6755373Smjacob