< prev index next >
src/hotspot/share/classfile/systemDictionary.hpp
Print this page
*** 32,41 ****
--- 32,88 ----
#include "runtime/mutexLocker.hpp"
#include "runtime/reflectionUtils.hpp"
#include "runtime/signature.hpp"
#include "utilities/hashtable.hpp"
+ class ClassInstanceInfo : public StackObj {
+ private:
+ InstanceKlass* _dynamic_nest_host;
+ Handle _class_data;
+
+ public:
+ ClassInstanceInfo() {
+ _dynamic_nest_host = NULL;
+ _class_data = Handle();
+ }
+ ClassInstanceInfo(InstanceKlass* dynamic_nest_host, Handle class_data) {
+ _dynamic_nest_host = dynamic_nest_host;
+ _class_data = class_data;
+ }
+
+ InstanceKlass* dynamic_nest_host() const { return _dynamic_nest_host; }
+ Handle class_data() const { return _class_data; }
+ friend class ClassLoadInfo;
+ };
+
+ class ClassLoadInfo : public StackObj {
+ private:
+ Handle _protection_domain;
+ const InstanceKlass* _unsafe_anonymous_host;
+ GrowableArray<Handle>* _cp_patches;
+ ClassInstanceInfo _class_hidden_info;
+ bool _is_hidden;
+ bool _is_weak_hidden;
+ bool _can_access_vm_annotations;
+
+ public:
+ ClassLoadInfo();
+ ClassLoadInfo(Handle protection_domain);
+ ClassLoadInfo(Handle protection_domain, const InstanceKlass* unsafe_anonymous_host,
+ GrowableArray<Handle>* cp_patches, InstanceKlass* dynamic_nest_host,
+ Handle class_data, bool is_hidden, bool is_weak_hidden,
+ bool can_access_vm_annotations);
+
+ Handle protection_domain() const { return _protection_domain; }
+ const InstanceKlass* unsafe_anonymous_host() const { return _unsafe_anonymous_host; }
+ GrowableArray<Handle>* cp_patches() const { return _cp_patches; }
+ const ClassInstanceInfo* class_hidden_info_ptr() const { return &_class_hidden_info; }
+ bool is_hidden() const { return _is_hidden; }
+ bool is_weak_hidden() const { return _is_weak_hidden; }
+ bool can_access_vm_annotations() const { return _can_access_vm_annotations; }
+ };
+
// The dictionary in each ClassLoaderData stores all loaded classes, either
// initiatied by its class loader or defined by its class loader:
//
// class loader -> ClassLoaderData -> [class, protection domain set]
//
*** 266,297 ****
Handle class_loader,
Handle protection_domain,
bool is_superclass,
TRAPS);
- // Parse new stream. This won't update the dictionary or
- // class hierarchy, simply parse the stream. Used by JVMTI RedefineClasses.
- // Also used by Unsafe_DefineAnonymousClass
- static InstanceKlass* parse_stream(Symbol* class_name,
- Handle class_loader,
- Handle protection_domain,
- ClassFileStream* st,
- TRAPS) {
- return parse_stream(class_name,
- class_loader,
- protection_domain,
- st,
- NULL, // unsafe_anonymous_host
- NULL, // cp_patches
- THREAD);
- }
static InstanceKlass* parse_stream(Symbol* class_name,
Handle class_loader,
- Handle protection_domain,
ClassFileStream* st,
! const InstanceKlass* unsafe_anonymous_host,
! GrowableArray<Handle>* cp_patches,
TRAPS);
// Resolve from stream (called by jni_DefineClass and JVM_DefineClass)
static InstanceKlass* resolve_from_stream(Symbol* class_name,
Handle class_loader,
--- 313,326 ----
Handle class_loader,
Handle protection_domain,
bool is_superclass,
TRAPS);
static InstanceKlass* parse_stream(Symbol* class_name,
Handle class_loader,
ClassFileStream* st,
! const ClassLoadInfo& cl_info,
TRAPS);
// Resolve from stream (called by jni_DefineClass and JVM_DefineClass)
static InstanceKlass* resolve_from_stream(Symbol* class_name,
Handle class_loader,
< prev index next >