src/share/vm/services/diagnosticFramework.hpp

Print this page
rev 3087 : 7141252: Diagnostic Framework Default parser fixes


 178   const char* name() const { return _name; }
 179   const char* description() const { return _description; }
 180   const char* type() const { return _type; }
 181   const char* default_string() const { return _default_string; }
 182   bool is_mandatory() const { return _mandatory; }
 183   bool is_option() const { return _option; }
 184   int position() const { return _position; }
 185 };
 186 
 187 // The DCmdParser class can be used to create an argument parser for a
 188 // diagnostic command. It is not mandatory to use it to parse arguments.
 189 class DCmdParser {
 190 private:
 191   GenDCmdArgument* _options;
 192   GenDCmdArgument* _arguments_list;
 193   char             _delim;
 194 public:
 195   DCmdParser() {
 196     _options = NULL;
 197     _arguments_list = NULL;

 198   }
 199   void add_dcmd_option(GenDCmdArgument* arg);
 200   void add_dcmd_argument(GenDCmdArgument* arg);
 201   GenDCmdArgument* lookup_dcmd_option(const char* name, size_t len);
 202   GenDCmdArgument* arguments_list() { return _arguments_list; };
 203   void check(TRAPS);
 204   void parse(CmdLine* line, char delim, TRAPS);
 205   void print_help(outputStream* out, const char* cmd_name);
 206   void reset(TRAPS);
 207   void cleanup();
 208   int num_arguments();
 209   GrowableArray<const char*>* argument_name_array();
 210   GrowableArray<DCmdArgumentInfo*>* argument_info_array();
 211 };
 212 
 213 // The DCmd class is the parent class of all diagnostic commands
 214 // Diagnostic command instances should not be instantiated directly but
 215 // created using the associated factory. The factory can be retrieved with
 216 // the DCmdFactory::getFactory() method.
 217 // A diagnostic command instance can either be allocated in the resource Area




 178   const char* name() const { return _name; }
 179   const char* description() const { return _description; }
 180   const char* type() const { return _type; }
 181   const char* default_string() const { return _default_string; }
 182   bool is_mandatory() const { return _mandatory; }
 183   bool is_option() const { return _option; }
 184   int position() const { return _position; }
 185 };
 186 
 187 // The DCmdParser class can be used to create an argument parser for a
 188 // diagnostic command. It is not mandatory to use it to parse arguments.
 189 class DCmdParser {
 190 private:
 191   GenDCmdArgument* _options;
 192   GenDCmdArgument* _arguments_list;
 193   char             _delim;
 194 public:
 195   DCmdParser() {
 196     _options = NULL;
 197     _arguments_list = NULL;
 198     _delim = ' ';
 199   }
 200   void add_dcmd_option(GenDCmdArgument* arg);
 201   void add_dcmd_argument(GenDCmdArgument* arg);
 202   GenDCmdArgument* lookup_dcmd_option(const char* name, size_t len);
 203   GenDCmdArgument* arguments_list() { return _arguments_list; };
 204   void check(TRAPS);
 205   void parse(CmdLine* line, char delim, TRAPS);
 206   void print_help(outputStream* out, const char* cmd_name);
 207   void reset(TRAPS);
 208   void cleanup();
 209   int num_arguments();
 210   GrowableArray<const char*>* argument_name_array();
 211   GrowableArray<DCmdArgumentInfo*>* argument_info_array();
 212 };
 213 
 214 // The DCmd class is the parent class of all diagnostic commands
 215 // Diagnostic command instances should not be instantiated directly but
 216 // created using the associated factory. The factory can be retrieved with
 217 // the DCmdFactory::getFactory() method.
 218 // A diagnostic command instance can either be allocated in the resource Area