< prev index next >

src/hotspot/share/runtime/arguments.hpp

Print this page

 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; }

457   // Update VM info property - called after argument parsing
458   static void update_vm_info_property(const char* vm_info) {
459     _vm_info->set_value(vm_info);
460   }
461 
462   // Property List manipulation
463   static void PropertyList_add(SystemProperty *element);
464   static void PropertyList_add(SystemProperty** plist, SystemProperty *element);
465   static void PropertyList_add(SystemProperty** plist, const char* k, const char* v, bool writeable, bool internal);
466 
467   static void PropertyList_unique_add(SystemProperty** plist, const char* k, const char* v,
468                                       PropertyAppendable append, PropertyWriteable writeable,
469                                       PropertyInternal internal);
470   static const char* PropertyList_get_value(SystemProperty* plist, const char* key);
471   static const char* PropertyList_get_readable_value(SystemProperty* plist, const char* key);
472   static int  PropertyList_count(SystemProperty* pl);
473   static int  PropertyList_readable_count(SystemProperty* pl);
474 
475   static bool is_internal_module_property(const char* option);
476   static bool is_incompatible_cds_internal_module_property(const char* property);

477 
478   // Miscellaneous System property value getter and setters.
479   static void set_dll_dir(const char *value) { _sun_boot_library_path->set_value(value); }
480   static void set_java_home(const char *value) { _java_home->set_value(value); }
481   static void set_library_path(const char *value) { _java_library_path->set_value(value); }
482   static void set_ext_dirs(char *value)     { _ext_dirs = os::strdup_check_oom(value); }
483 
484   // Set up the underlying pieces of the boot class path
485   static void add_patch_mod_prefix(const char *module_name, const char *path);

486   static void set_boot_class_path(const char *value, bool has_jimage) {
487     // During start up, set by os::set_boot_path()
488     assert(get_boot_class_path() == nullptr, "Boot class path previously set");
489     _boot_class_path->set_value(value);
490     _has_jimage = has_jimage;
491   }
492   static void append_sysclasspath(const char *value) {
493     _boot_class_path->append_value(value);
494     _jdk_boot_class_path_append->append_value(value);
495   }
496 
497   static GrowableArray<ModulePatchPath*>* get_patch_mod_prefix() { return _patch_mod_prefix; }
498   static char* get_boot_class_path() { return _boot_class_path->value(); }
499   static bool has_jimage() { return _has_jimage; }
500 
501   static char* get_java_home()    { return _java_home->value(); }
502   static char* get_dll_dir()      { return _sun_boot_library_path->value(); }
503   static char* get_appclasspath() { return _java_class_path->value(); }
504   static void  fix_appclasspath();
505 

 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; }

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