Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/hotspot/share/classfile/classLoadInfo.hpp
40949 views
1
/*
2
* Copyright (c) 2020, 2021, 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_CLASSFILE_CLASSLOADINFO_HPP
26
#define SHARE_CLASSFILE_CLASSLOADINFO_HPP
27
28
#include "runtime/handles.hpp"
29
30
class InstanceKlass;
31
32
template <typename T> class GrowableArray;
33
34
class ClassInstanceInfo : public StackObj {
35
private:
36
InstanceKlass* _dynamic_nest_host;
37
Handle _class_data;
38
39
public:
40
ClassInstanceInfo() {
41
_dynamic_nest_host = NULL;
42
_class_data = Handle();
43
}
44
ClassInstanceInfo(InstanceKlass* dynamic_nest_host, Handle class_data) {
45
_dynamic_nest_host = dynamic_nest_host;
46
_class_data = class_data;
47
}
48
49
InstanceKlass* dynamic_nest_host() const { return _dynamic_nest_host; }
50
Handle class_data() const { return _class_data; }
51
friend class ClassLoadInfo;
52
};
53
54
class ClassLoadInfo : public StackObj {
55
private:
56
Handle _protection_domain;
57
ClassInstanceInfo _class_hidden_info;
58
bool _is_hidden;
59
bool _is_strong_hidden;
60
bool _can_access_vm_annotations;
61
62
public:
63
ClassLoadInfo(Handle protection_domain) {
64
_protection_domain = protection_domain;
65
_class_hidden_info._dynamic_nest_host = NULL;
66
_class_hidden_info._class_data = Handle();
67
_is_hidden = false;
68
_is_strong_hidden = false;
69
_can_access_vm_annotations = false;
70
}
71
72
ClassLoadInfo(Handle protection_domain, InstanceKlass* dynamic_nest_host,
73
Handle class_data, bool is_hidden, bool is_strong_hidden,
74
bool can_access_vm_annotations) {
75
_protection_domain = protection_domain;
76
_class_hidden_info._dynamic_nest_host = dynamic_nest_host;
77
_class_hidden_info._class_data = class_data;
78
_is_hidden = is_hidden;
79
_is_strong_hidden = is_strong_hidden;
80
_can_access_vm_annotations = can_access_vm_annotations;
81
}
82
83
Handle protection_domain() const { return _protection_domain; }
84
const ClassInstanceInfo* class_hidden_info_ptr() const { return &_class_hidden_info; }
85
bool is_hidden() const { return _is_hidden; }
86
bool is_strong_hidden() const { return _is_strong_hidden; }
87
bool can_access_vm_annotations() const { return _can_access_vm_annotations; }
88
};
89
90
#endif // SHARE_CLASSFILE_CLASSLOADINFO_HPP
91
92