224 arg = arg->next(); |
224 arg = arg->next(); |
225 } |
225 } |
226 } |
226 } |
227 |
227 |
228 void DCmdParser::print_help(outputStream* out, const char* cmd_name) { |
228 void DCmdParser::print_help(outputStream* out, const char* cmd_name) { |
229 out->print("\nSyntax : %s %s", cmd_name, _options == NULL ? "" : "[options]"); |
229 out->print("Syntax : %s %s", cmd_name, _options == NULL ? "" : "[options]"); |
230 GenDCmdArgument* arg = _arguments_list; |
230 GenDCmdArgument* arg = _arguments_list; |
231 while (arg != NULL) { |
231 while (arg != NULL) { |
232 if (arg->is_mandatory()) { |
232 if (arg->is_mandatory()) { |
233 out->print(" <%s>", arg->name()); |
233 out->print(" <%s>", arg->name()); |
234 } else { |
234 } else { |
371 command->execute(CHECK); |
371 command->execute(CHECK); |
372 } |
372 } |
373 } |
373 } |
374 } |
374 } |
375 |
375 |
|
376 void DCmdWithParser::parse(CmdLine* line, char delim, TRAPS) { |
|
377 _dcmdparser.parse(line, delim, CHECK); |
|
378 } |
|
379 |
|
380 void DCmdWithParser::print_help(const char* name) { |
|
381 _dcmdparser.print_help(output(), name); |
|
382 } |
|
383 |
|
384 void DCmdWithParser::reset(TRAPS) { |
|
385 _dcmdparser.reset(CHECK); |
|
386 } |
|
387 |
|
388 void DCmdWithParser::cleanup() { |
|
389 _dcmdparser.cleanup(); |
|
390 } |
|
391 |
|
392 GrowableArray<const char*>* DCmdWithParser::argument_name_array() { |
|
393 return _dcmdparser.argument_name_array(); |
|
394 } |
|
395 |
|
396 GrowableArray<DCmdArgumentInfo*>* DCmdWithParser::argument_info_array() { |
|
397 return _dcmdparser.argument_info_array(); |
|
398 } |
|
399 |
376 Mutex* DCmdFactory::_dcmdFactory_lock = new Mutex(Mutex::leaf, "DCmdFactory", true); |
400 Mutex* DCmdFactory::_dcmdFactory_lock = new Mutex(Mutex::leaf, "DCmdFactory", true); |
377 |
401 |
378 DCmdFactory* DCmdFactory::factory(const char* name, size_t len) { |
402 DCmdFactory* DCmdFactory::factory(const char* name, size_t len) { |
379 MutexLockerEx ml(_dcmdFactory_lock, Mutex::_no_safepoint_check_flag); |
403 MutexLockerEx ml(_dcmdFactory_lock, Mutex::_no_safepoint_check_flag); |
380 DCmdFactory* factory = _DCmdFactoryList; |
404 DCmdFactory* factory = _DCmdFactoryList; |