Package org.eclipse.epsilon.common.cli
Class ConfigParser<C extends ProfilableRunConfiguration,B extends ProfilableRunConfiguration.Builder<C,B>>
java.lang.Object
org.eclipse.epsilon.common.cli.ConfigParser<C,B>
- Direct Known Subclasses:
EolConfigParser
public class ConfigParser<C extends ProfilableRunConfiguration,B extends ProfilableRunConfiguration.Builder<C,B>>
extends Object
implements Consumer<String[]>, Function<String[],C>
Convenience class providing an extensible command-line builder for
ProfilableRunConfiguration
.- Since:
- 1.6
- Author:
- Sina Madani
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected B
protected org.apache.commons.cli.CommandLine
protected org.apache.commons.cli.HelpFormatter
protected String
protected String
protected String
protected org.apache.commons.cli.Options
protected String
protected String
protected String
protected String
protected C
protected String
protected String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
final C
protected String
protected void
final void
parseAndRun
(String[] args) protected void
protected double
protected double
protected int
protected long
-
Field Details
-
builder
-
runConfig
-
nL
-
profileExecutionOpt
-
repeatsOpt
-
showResultsOpt
-
helpOpt
-
scriptOpt
-
outFileOpt
-
requiredUsage
-
optionalUsage
-
options
protected org.apache.commons.cli.Options options -
help
protected org.apache.commons.cli.HelpFormatter help -
cmdLine
protected org.apache.commons.cli.CommandLine cmdLine
-
-
Constructor Details
-
ConfigParser
-
-
Method Details
-
formatUsage
-
parseArgs
- Throws:
Exception
-
handleException
-
tryParse
- Throws:
IllegalArgumentException
-
tryParse
- Throws:
IllegalArgumentException
-
tryParse
- Throws:
IllegalArgumentException
-
tryParse
- Throws:
IllegalArgumentException
-
accept
- Specified by:
accept
in interfaceConsumer<C extends ProfilableRunConfiguration>
-
apply
- Specified by:
apply
in interfaceFunction<C extends ProfilableRunConfiguration,
B extends ProfilableRunConfiguration.Builder<C, B>>
-
parseAndRun
-