/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_VM_CI_CIKLASS_HPP
#define SHARE_VM_CI_CIKLASS_HPP
#include "ci/ciType.hpp"
#include "oops/klassOop.hpp"
// ciKlass
//
// This class and its subclasses represent klassOops in the
// HotSpot virtual machine. In the vm, each klassOop contains an
// embedded Klass object. ciKlass is subclassed to explicitly
// represent the kind of Klass embedded in the klassOop. For
// example, a klassOop with an embedded objArrayKlass object is
// represented in the ciObject hierarchy by the class
// ciObjArrayKlass.
friend class ciEnv;
friend class ciField;
friend class ciMethod;
friend class ciObjArrayKlass;
private:
protected:
return k;
}
// Certain subklasses have an associated class loader.
public:
// What is the name of this klass?
// What is its layout helper value?
juint super_depth();
bool can_be_primary_super();
// Get the shared parent of two klasses.
virtual bool is_interface() {
return false;
}
virtual bool is_abstract() {
return false;
}
// Does this type (array, class, interface) have no subtypes?
virtual bool is_leaf_type() {
return false;
}
// Attempt to get a klass using this ciKlass's loader.
// Note: To find a class from its name string, use ciSymbol::make,
// but consider adding to vmSymbols.hpp instead.
// Get the instance of java.lang.Class corresponding to this klass.
// Fetch Klass::modifier_flags.
// Fetch Klass::access_flags.
jint access_flags();
// What kind of ciObject is this?
bool is_klass() { return true; }
};
#endif // SHARE_VM_CI_CIKLASS_HPP