Modifier and Type | Field and Description |
---|---|
(package private) java.util.List<Option<T>> |
arguments |
(package private) java.util.List<Option<T>> |
options |
(package private) java.util.List<Parameter<T>> |
parameters |
(package private) java.lang.String |
prmSeparator |
private java.lang.String |
runnerClassName
The class name of a runnable e.g.
|
Constructor and Description |
---|
RunnerConfig() |
Modifier and Type | Method and Description |
---|---|
void |
addOption(Option<T> option)
Adds Option to the internal list of options
|
void |
addParameter(Parameter<T> param)
Adds parameter to the internal parameter list
|
RunnerConfig<T> |
copyAndValidateRConfig(RunnerConfig<?> runnerConf) |
boolean |
equals(java.lang.Object obj) |
Option<T> |
getArgument(java.lang.String name)
Returns the argument by its name if found, NULL otherwise.
|
Option<T> |
getArgumentByOptionName(java.lang.String optionName)
Returns the argument by option name, NULL if the argument is not found
|
java.util.List<Option<T>> |
getArguments()
|
java.util.List<Option<T>> |
getOptions()
Returns the list of the Options supported by the executable of type T
|
java.util.List<Parameter<T>> |
getParameters()
Returns the list of parameters supported executable of type T.
|
java.lang.String |
getPrmSeparator() |
java.lang.String |
getRunnerClassName() |
boolean |
removeArgument(java.lang.String name)
Removes the argument
Argument if found. |
boolean |
removeArgumentByOptionName(java.lang.String optionName)
Removes the argument which can be a Parameter or an Option instance by
the value in
|
void |
setOptions(java.util.List<Option<T>> parameters)
Adds the list of options or parameters to the internal list of options
|
void |
setParameters(java.util.List<Parameter<T>> parameters)
Sets the list of parameters as internal list
|
void |
setPrmSeparator(java.lang.String prmSeparator)
Sets name value separator character
|
void |
setRunnerClassName(java.lang.String runnerClassName)
Set the name of a runner class
|
java.lang.String |
toString() |
void |
validate()
Validate the value of the argument.
|
private java.lang.String runnerClassName
java.lang.String prmSeparator
public RunnerConfig<T> copyAndValidateRConfig(RunnerConfig<?> runnerConf)
public java.util.List<Option<T>> getOptions()
public void addParameter(Parameter<T> param)
public void addOption(Option<T> option)
option
- the Option
to addpublic java.lang.String getPrmSeparator()
public void setPrmSeparator(java.lang.String prmSeparator)
prmSeparator
- the separator charpublic void setOptions(java.util.List<Option<T>> parameters)
parameters
- the list of parameters to addpublic java.lang.String getRunnerClassName()
public void setRunnerClassName(java.lang.String runnerClassName)
runnerClassName
- the name of the executable wrapping classpublic void setParameters(java.util.List<Parameter<T>> parameters)
parameters
- the list of parameterspublic java.util.List<Parameter<T>> getParameters()
Parameter
is an Option
with value.Parameter
supported by type T.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public Option<T> getArgument(java.lang.String name)
Option
and Parameter
therefore this method can return either. If you need to retrieve the
Option by its optionNames use @link
getArgumentByOptionName(String)
method. The
difference between option name and optionName is explained by the
following example:
In the example, the "Sequence type" is a name whereas --amino, --nuc and --auto are all optionNames. This dichotomy only manifests inSequence type --nuc - Assume the sequences are nucleotide. --amino - Assume the sequences are amino acid. --amino --nuc --auto
Option
never in Parameters
as the latter can
only have single name
- the Parameter of Option nameArgument
public boolean removeArgument(java.lang.String name)
name
- of the argumentpublic Option<T> getArgumentByOptionName(java.lang.String optionName)
optionName
- - the optionName. This is not the same as an Option name.
For example:
The name of the option in the example is "Output sequences order" whereas optionNames are "--inputorder" and "--reorder". If you need to retrieve the Option or Parameter by its names useOutput sequences order --inputorder - Output order: same as input. --reorder - Output order: aligned. Default: same as input --inputorder --reorder
getArgument(String)
methodpublic boolean removeArgumentByOptionName(java.lang.String optionName)
optionName
- the optionName of the option, do not confuse with the name!for destinctions
between optionNames and the name of the Option
public void validate() throws javax.xml.bind.ValidationException
javax.xml.bind.ValidationException
- if any of the arguments found invalid which is when
ValueConstrain
boundary