protected Launcher() { this.startupTimeLogHelper = new StartupTimeLogHelper(); this.allowedCommandLineCommands = new HashSet<>(); this.allowedCommandLineCommands.add(CliStrings.RUN); this.allowedCommandLineCommands.add(CliStrings.START_PULSE); this.allowedCommandLineCommands.add(CliStrings.START_JCONSOLE); this.allowedCommandLineCommands.add(CliStrings.START_JVISUALVM); this.allowedCommandLineCommands.add(CliStrings.START_LOCATOR); this.allowedCommandLineCommands.add(CliStrings.START_MANAGER); this.allowedCommandLineCommands.add(CliStrings.START_SERVER); this.allowedCommandLineCommands.add(CliStrings.START_VSD); this.allowedCommandLineCommands.add(CliStrings.STATUS_LOCATOR); this.allowedCommandLineCommands.add(CliStrings.STATUS_SERVER); this.allowedCommandLineCommands.add(CliStrings.STOP_LOCATOR); this.allowedCommandLineCommands.add(CliStrings.STOP_SERVER); this.allowedCommandLineCommands.add(CliStrings.VERSION); this.allowedCommandLineCommands.add(CliStrings.COMPACT_OFFLINE_DISK_STORE); this.allowedCommandLineCommands.add(CliStrings.DESCRIBE_OFFLINE_DISK_STORE); this.allowedCommandLineCommands.add(CliStrings.EXPORT_OFFLINE_DISK_STORE); this.allowedCommandLineCommands.add(CliStrings.VALIDATE_DISK_STORE); this.allowedCommandLineCommands.add(CliStrings.PDX_DELETE_FIELD); this.allowedCommandLineCommands.add(CliStrings.PDX_RENAME); this.commandLineParser = new OptionParser(); this.commandLineParser.accepts(EXECUTE_OPTION).withOptionalArg().ofType(String.class); this.commandLineParser.accepts(HELP_OPTION).withOptionalArg().ofType(Boolean.class); this.commandLineParser.posixlyCorrect(false); }
parser.posixlyCorrect(System.getenv("POSIXLY_CORRECT") != null); parser.recognizeAlternativeLongOptions(true);
/** * Construct the multi-command with the specified command description and runnable to execute before main is invoked. * * @param description the multi-command description * @param beforeMain the before-main runnable */ public MultiCommand(final String description, final Runnable beforeMain) { super(description, beforeMain); parser.posixlyCorrect(true); }
/** * Construct the multi-command with the specified command description and runnable to execute before main is invoked. * * @param description the multi-command description * @param beforeMain the before-main runnable */ public MultiCommand(final String description, final Runnable beforeMain) { super(description, beforeMain); parser.posixlyCorrect(true); }
public MultiCommand(String description) { super(description); parser.posixlyCorrect(true); }
private void adjustForPosixlyCorrect( OptionParser parser ) { if ( POSIXLY_CORRECT_MARKER == specification.charAt( 0 ) ) { parser.posixlyCorrect( true ); specification = specification.substring( 1 ); } }
private void adjustForPosixlyCorrect( OptionParser parser ) { if ( POSIXLY_CORRECT_MARKER == specification.charAt( 0 ) ) { parser.posixlyCorrect( true ); specification = specification.substring( 1 ); } }
private void adjustForPosixlyCorrect( OptionParser parser ) { if ( POSIXLY_CORRECT_MARKER == specification.charAt( 0 ) ) { parser.posixlyCorrect( true ); specification = specification.substring( 1 ); } }
private void adjustForPosixlyCorrect( OptionParser parser ) { if ( POSIXLY_CORRECT_MARKER == specification.charAt( 0 ) ) { parser.posixlyCorrect( true ); specification = specification.substring( 1 ); } }
private void adjustForPosixlyCorrect( OptionParser parser ) { if ( POSIXLY_CORRECT_MARKER == specification.charAt( 0 ) ) { parser.posixlyCorrect( true ); specification = specification.substring( 1 ); } }
protected Launcher() { this.startupTimeLogHelper = new StartupTimeLogHelper(); this.allowedCommandLineCommands = new HashSet<String>(); this.allowedCommandLineCommands.add(CliStrings.ENCRYPT); this.allowedCommandLineCommands.add(CliStrings.RUN); this.allowedCommandLineCommands.add(CliStrings.START_PULSE); this.allowedCommandLineCommands.add(CliStrings.START_JCONSOLE); this.allowedCommandLineCommands.add(CliStrings.START_JVISUALVM); this.allowedCommandLineCommands.add(CliStrings.START_LOCATOR); this.allowedCommandLineCommands.add(CliStrings.START_MANAGER); this.allowedCommandLineCommands.add(CliStrings.START_SERVER); this.allowedCommandLineCommands.add(CliStrings.START_VSD); this.allowedCommandLineCommands.add(CliStrings.STATUS_LOCATOR); this.allowedCommandLineCommands.add(CliStrings.STATUS_SERVER); this.allowedCommandLineCommands.add(CliStrings.STOP_LOCATOR); this.allowedCommandLineCommands.add(CliStrings.STOP_SERVER); this.allowedCommandLineCommands.add(CliStrings.VERSION); this.allowedCommandLineCommands.add(CliStrings.COMPACT_OFFLINE_DISK_STORE); this.allowedCommandLineCommands.add(CliStrings.DESCRIBE_OFFLINE_DISK_STORE); this.allowedCommandLineCommands.add(CliStrings.VALIDATE_DISK_STORE); this.commandLineParser = new OptionParser(); this.commandLineParser.accepts(EXECUTE_OPTION).withOptionalArg().ofType(String.class); this.commandLineParser.accepts(HELP_OPTION).withOptionalArg().ofType(Boolean.class); this.commandLineParser.posixlyCorrect(false); }
protected Launcher() { this.startupTimeLogHelper = new StartupTimeLogHelper(); this.allowedCommandLineCommands = new HashSet<String>(); this.allowedCommandLineCommands.add(CliStrings.ENCRYPT); this.allowedCommandLineCommands.add(CliStrings.RUN); this.allowedCommandLineCommands.add(CliStrings.START_PULSE); this.allowedCommandLineCommands.add(CliStrings.START_JCONSOLE); this.allowedCommandLineCommands.add(CliStrings.START_JVISUALVM); this.allowedCommandLineCommands.add(CliStrings.START_LOCATOR); this.allowedCommandLineCommands.add(CliStrings.START_MANAGER); this.allowedCommandLineCommands.add(CliStrings.START_SERVER); this.allowedCommandLineCommands.add(CliStrings.START_VSD); this.allowedCommandLineCommands.add(CliStrings.STATUS_LOCATOR); this.allowedCommandLineCommands.add(CliStrings.STATUS_SERVER); this.allowedCommandLineCommands.add(CliStrings.STOP_LOCATOR); this.allowedCommandLineCommands.add(CliStrings.STOP_SERVER); this.allowedCommandLineCommands.add(CliStrings.VERSION); this.allowedCommandLineCommands.add(CliStrings.COMPACT_OFFLINE_DISK_STORE); this.allowedCommandLineCommands.add(CliStrings.DESCRIBE_OFFLINE_DISK_STORE); this.allowedCommandLineCommands.add(CliStrings.EXPORT_OFFLINE_DISK_STORE); this.allowedCommandLineCommands.add(CliStrings.VALIDATE_DISK_STORE); this.allowedCommandLineCommands.add(CliStrings.PDX_DELETE_FIELD); this.allowedCommandLineCommands.add(CliStrings.PDX_RENAME); this.commandLineParser = new OptionParser(); this.commandLineParser.accepts(EXECUTE_OPTION).withOptionalArg().ofType(String.class); this.commandLineParser.accepts(HELP_OPTION).withOptionalArg().ofType(Boolean.class); this.commandLineParser.posixlyCorrect(false); }
private void handleOptionArgument( OptionParser parser, OptionSet detectedOptions, ArgumentList arguments ) { if ( parser.posixlyCorrect() ) { detectedOptions.add( this ); parser.noMoreOptions(); } else addArguments( detectedOptions, arguments.next() ); } }
private void handleOptionArgument( OptionParser parser, OptionSet detectedOptions, ArgumentList arguments ) { if ( parser.posixlyCorrect() ) { detectedOptions.add( this ); parser.noMoreOptions(); } else addArguments( detectedOptions, arguments.next() ); } }
private void handleOptionArgument( OptionParser parser, OptionSet detectedOptions, ArgumentList arguments ) { if ( parser.posixlyCorrect() ) { detectedOptions.add( this ); parser.noMoreOptions(); } else addArguments( detectedOptions, arguments.next() ); } }
private void handleOptionArgument( OptionParser parser, OptionSet detectedOptions, ArgumentList arguments ) { if ( parser.posixlyCorrect() ) { detectedOptions.add( this ); parser.noMoreOptions(); } else addArguments( detectedOptions, arguments.next() ); } }
private void handleOptionArgument( OptionParser parser, OptionSet detectedOptions, ArgumentList arguments ) { if ( parser.posixlyCorrect() ) { detectedOptions.add( this ); parser.noMoreOptions(); } else addArguments( detectedOptions, arguments.next() ); } }
parser.posixlyCorrect(false);
parser.posixlyCorrect(System.getenv("POSIXLY_CORRECT") != null); parser.recognizeAlternativeLongOptions(true);