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; }
456 static void PropertyList_add(SystemProperty** plist, const char* k, const char* v, bool writeable, bool internal);
457
458 static void PropertyList_unique_add(SystemProperty** plist, const char* k, const char* v,
459 PropertyAppendable append, PropertyWriteable writeable,
460 PropertyInternal internal);
461 static const char* PropertyList_get_value(SystemProperty* plist, const char* key);
462 static const char* PropertyList_get_readable_value(SystemProperty* plist, const char* key);
463 static int PropertyList_count(SystemProperty* pl);
464 static int PropertyList_readable_count(SystemProperty* pl);
465
466 static bool is_internal_module_property(const char* option);
467 static bool is_incompatible_cds_internal_module_property(const char* property);
468
469 // Miscellaneous System property value getter and setters.
470 static void set_dll_dir(const char *value) { _sun_boot_library_path->set_value(value); }
471 static void set_java_home(const char *value) { _java_home->set_value(value); }
472 static void set_library_path(const char *value) { _java_library_path->set_value(value); }
473 static void set_ext_dirs(char *value) { _ext_dirs = os::strdup_check_oom(value); }
474
475 // Set up the underlying pieces of the boot class path
476 static void add_patch_mod_prefix(const char *module_name, const char *path);
477 static void set_boot_class_path(const char *value, bool has_jimage) {
478 // During start up, set by os::set_boot_path()
479 assert(get_boot_class_path() == nullptr, "Boot class path previously set");
480 _boot_class_path->set_value(value);
481 _has_jimage = has_jimage;
482 }
483 static void append_sysclasspath(const char *value) {
484 _boot_class_path->append_value(value);
485 _jdk_boot_class_path_append->append_value(value);
486 }
487
488 static GrowableArray<ModulePatchPath*>* get_patch_mod_prefix() { return _patch_mod_prefix; }
489 static char* get_boot_class_path() { return _boot_class_path->value(); }
490 static bool has_jimage() { return _has_jimage; }
491
492 static char* get_java_home() { return _java_home->value(); }
493 static char* get_dll_dir() { return _sun_boot_library_path->value(); }
494 static char* get_appclasspath() { return _java_class_path->value(); }
495 static void fix_appclasspath();
496
|
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; }
457 static void PropertyList_add(SystemProperty** plist, const char* k, const char* v, bool writeable, bool internal);
458
459 static void PropertyList_unique_add(SystemProperty** plist, const char* k, const char* v,
460 PropertyAppendable append, PropertyWriteable writeable,
461 PropertyInternal internal);
462 static const char* PropertyList_get_value(SystemProperty* plist, const char* key);
463 static const char* PropertyList_get_readable_value(SystemProperty* plist, const char* key);
464 static int PropertyList_count(SystemProperty* pl);
465 static int PropertyList_readable_count(SystemProperty* pl);
466
467 static bool is_internal_module_property(const char* option);
468 static bool is_incompatible_cds_internal_module_property(const char* property);
469
470 // Miscellaneous System property value getter and setters.
471 static void set_dll_dir(const char *value) { _sun_boot_library_path->set_value(value); }
472 static void set_java_home(const char *value) { _java_home->set_value(value); }
473 static void set_library_path(const char *value) { _java_library_path->set_value(value); }
474 static void set_ext_dirs(char *value) { _ext_dirs = os::strdup_check_oom(value); }
475
476 // Set up the underlying pieces of the boot class path
477 static void add_patch_mod_prefix(const char *module_name, const char *path, bool allow_append, bool allow_cds);
478 static int finalize_patch_module();
479 static void set_boot_class_path(const char *value, bool has_jimage) {
480 // During start up, set by os::set_boot_path()
481 assert(get_boot_class_path() == nullptr, "Boot class path previously set");
482 _boot_class_path->set_value(value);
483 _has_jimage = has_jimage;
484 }
485 static void append_sysclasspath(const char *value) {
486 _boot_class_path->append_value(value);
487 _jdk_boot_class_path_append->append_value(value);
488 }
489
490 static GrowableArray<ModulePatchPath*>* get_patch_mod_prefix() { return _patch_mod_prefix; }
491 static char* get_boot_class_path() { return _boot_class_path->value(); }
492 static bool has_jimage() { return _has_jimage; }
493
494 static char* get_java_home() { return _java_home->value(); }
495 static char* get_dll_dir() { return _sun_boot_library_path->value(); }
496 static char* get_appclasspath() { return _java_class_path->value(); }
497 static void fix_appclasspath();
498
|