Path: blob/master/src/hotspot/share/classfile/classLoadInfo.hpp
40949 views
/*1* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_CLASSFILE_CLASSLOADINFO_HPP25#define SHARE_CLASSFILE_CLASSLOADINFO_HPP2627#include "runtime/handles.hpp"2829class InstanceKlass;3031template <typename T> class GrowableArray;3233class ClassInstanceInfo : public StackObj {34private:35InstanceKlass* _dynamic_nest_host;36Handle _class_data;3738public:39ClassInstanceInfo() {40_dynamic_nest_host = NULL;41_class_data = Handle();42}43ClassInstanceInfo(InstanceKlass* dynamic_nest_host, Handle class_data) {44_dynamic_nest_host = dynamic_nest_host;45_class_data = class_data;46}4748InstanceKlass* dynamic_nest_host() const { return _dynamic_nest_host; }49Handle class_data() const { return _class_data; }50friend class ClassLoadInfo;51};5253class ClassLoadInfo : public StackObj {54private:55Handle _protection_domain;56ClassInstanceInfo _class_hidden_info;57bool _is_hidden;58bool _is_strong_hidden;59bool _can_access_vm_annotations;6061public:62ClassLoadInfo(Handle protection_domain) {63_protection_domain = protection_domain;64_class_hidden_info._dynamic_nest_host = NULL;65_class_hidden_info._class_data = Handle();66_is_hidden = false;67_is_strong_hidden = false;68_can_access_vm_annotations = false;69}7071ClassLoadInfo(Handle protection_domain, InstanceKlass* dynamic_nest_host,72Handle class_data, bool is_hidden, bool is_strong_hidden,73bool can_access_vm_annotations) {74_protection_domain = protection_domain;75_class_hidden_info._dynamic_nest_host = dynamic_nest_host;76_class_hidden_info._class_data = class_data;77_is_hidden = is_hidden;78_is_strong_hidden = is_strong_hidden;79_can_access_vm_annotations = can_access_vm_annotations;80}8182Handle protection_domain() const { return _protection_domain; }83const ClassInstanceInfo* class_hidden_info_ptr() const { return &_class_hidden_info; }84bool is_hidden() const { return _is_hidden; }85bool is_strong_hidden() const { return _is_strong_hidden; }86bool can_access_vm_annotations() const { return _can_access_vm_annotations; }87};8889#endif // SHARE_CLASSFILE_CLASSLOADINFO_HPP909192