74 void append_value(const char *value);
75
76 PathString(const char* value);
77 ~PathString();
78
79 // for JVM_ReadSystemPropertiesInfo
80 static int value_offset_in_bytes() { return (int)offset_of(PathString, _value); }
81 };
82
83 // ModulePatchPath records the module/path pair as specified to --patch-module.
84 class ModulePatchPath : public CHeapObj<mtInternal> {
85 private:
86 char* _module_name;
87 PathString* _path;
88 public:
89 ModulePatchPath(const char* module_name, const char* path);
90 ~ModulePatchPath();
91
92 inline const char* module_name() const { return _module_name; }
93 inline char* path_string() const { return _path->value(); }
94 };
95
96 // Element describing System and User (-Dkey=value flags) defined property.
97 //
98 // An internal SystemProperty is one that has been removed in
99 // jdk.internal.VM.saveAndRemoveProperties, like jdk.boot.class.path.append.
100 //
101 class SystemProperty : public PathString {
102 private:
103 char* _key;
104 SystemProperty* _next;
105 bool _internal;
106 bool _writeable;
107
108 public:
109 // Accessors
110 char* value() const { return PathString::value(); }
111 const char* key() const { return _key; }
112 bool internal() const { return _internal; }
113 SystemProperty* next() const { return _next; }
459 static void PropertyList_add(SystemProperty** plist, const char* k, const char* v, bool writeable, bool internal);
460
461 static void PropertyList_unique_add(SystemProperty** plist, const char* k, const char* v,
462 PropertyAppendable append, PropertyWriteable writeable,
463 PropertyInternal internal);
464 static const char* PropertyList_get_value(SystemProperty* plist, const char* key);
465 static const char* PropertyList_get_readable_value(SystemProperty* plist, const char* key);
466 static int PropertyList_count(SystemProperty* pl);
467 static int PropertyList_readable_count(SystemProperty* pl);
468
469 static bool is_internal_module_property(const char* option);
470 static bool is_incompatible_cds_internal_module_property(const char* property);
471
472 // Miscellaneous System property value getter and setters.
473 static void set_dll_dir(const char *value) { _sun_boot_library_path->set_value(value); }
474 static void set_java_home(const char *value) { _java_home->set_value(value); }
475 static void set_library_path(const char *value) { _java_library_path->set_value(value); }
476 static void set_ext_dirs(char *value) { _ext_dirs = os::strdup_check_oom(value); }
477
478 // Set up the underlying pieces of the boot class path
479 static void add_patch_mod_prefix(const char *module_name, const char *path);
480 static void set_boot_class_path(const char *value, bool has_jimage) {
481 // During start up, set by os::set_boot_path()
482 assert(get_boot_class_path() == nullptr, "Boot class path previously set");
483 _boot_class_path->set_value(value);
484 _has_jimage = has_jimage;
485 }
486 static void append_sysclasspath(const char *value) {
487 _boot_class_path->append_value(value);
488 _jdk_boot_class_path_append->append_value(value);
489 }
490
491 static GrowableArray<ModulePatchPath*>* get_patch_mod_prefix() { return _patch_mod_prefix; }
492 static char* get_boot_class_path() { return _boot_class_path->value(); }
493 static bool has_jimage() { return _has_jimage; }
494
495 static char* get_java_home() { return _java_home->value(); }
496 static char* get_dll_dir() { return _sun_boot_library_path->value(); }
497 static char* get_appclasspath() { return _java_class_path->value(); }
498 static void fix_appclasspath();
499
|
74 void append_value(const char *value);
75
76 PathString(const char* value);
77 ~PathString();
78
79 // for JVM_ReadSystemPropertiesInfo
80 static int value_offset_in_bytes() { return (int)offset_of(PathString, _value); }
81 };
82
83 // ModulePatchPath records the module/path pair as specified to --patch-module.
84 class ModulePatchPath : public CHeapObj<mtInternal> {
85 private:
86 char* _module_name;
87 PathString* _path;
88 public:
89 ModulePatchPath(const char* module_name, const char* path);
90 ~ModulePatchPath();
91
92 inline const char* module_name() const { return _module_name; }
93 inline char* path_string() const { return _path->value(); }
94 inline void append_path(const char* path) { _path->append_value(path); }
95 };
96
97 // Element describing System and User (-Dkey=value flags) defined property.
98 //
99 // An internal SystemProperty is one that has been removed in
100 // jdk.internal.VM.saveAndRemoveProperties, like jdk.boot.class.path.append.
101 //
102 class SystemProperty : public PathString {
103 private:
104 char* _key;
105 SystemProperty* _next;
106 bool _internal;
107 bool _writeable;
108
109 public:
110 // Accessors
111 char* value() const { return PathString::value(); }
112 const char* key() const { return _key; }
113 bool internal() const { return _internal; }
114 SystemProperty* next() const { return _next; }
460 static void PropertyList_add(SystemProperty** plist, const char* k, const char* v, bool writeable, bool internal);
461
462 static void PropertyList_unique_add(SystemProperty** plist, const char* k, const char* v,
463 PropertyAppendable append, PropertyWriteable writeable,
464 PropertyInternal internal);
465 static const char* PropertyList_get_value(SystemProperty* plist, const char* key);
466 static const char* PropertyList_get_readable_value(SystemProperty* plist, const char* key);
467 static int PropertyList_count(SystemProperty* pl);
468 static int PropertyList_readable_count(SystemProperty* pl);
469
470 static bool is_internal_module_property(const char* option);
471 static bool is_incompatible_cds_internal_module_property(const char* property);
472
473 // Miscellaneous System property value getter and setters.
474 static void set_dll_dir(const char *value) { _sun_boot_library_path->set_value(value); }
475 static void set_java_home(const char *value) { _java_home->set_value(value); }
476 static void set_library_path(const char *value) { _java_library_path->set_value(value); }
477 static void set_ext_dirs(char *value) { _ext_dirs = os::strdup_check_oom(value); }
478
479 // Set up the underlying pieces of the boot class path
480 static void add_patch_mod_prefix(const char *module_name, const char *path, bool allow_append, bool allow_cds);
481 static int finalize_patch_module();
482 static void set_boot_class_path(const char *value, bool has_jimage) {
483 // During start up, set by os::set_boot_path()
484 assert(get_boot_class_path() == nullptr, "Boot class path previously set");
485 _boot_class_path->set_value(value);
486 _has_jimage = has_jimage;
487 }
488 static void append_sysclasspath(const char *value) {
489 _boot_class_path->append_value(value);
490 _jdk_boot_class_path_append->append_value(value);
491 }
492
493 static GrowableArray<ModulePatchPath*>* get_patch_mod_prefix() { return _patch_mod_prefix; }
494 static char* get_boot_class_path() { return _boot_class_path->value(); }
495 static bool has_jimage() { return _has_jimage; }
496
497 static char* get_java_home() { return _java_home->value(); }
498 static char* get_dll_dir() { return _sun_boot_library_path->value(); }
499 static char* get_appclasspath() { return _java_class_path->value(); }
500 static void fix_appclasspath();
501
|