public final class FromArguments extends Object implements Arguments<FromArguments>
from command.| Constructor and Description |
|---|
FromArguments()
Constructor to use if no options are specified.
|
| Modifier and Type | Method and Description |
|---|---|
FromArguments |
getForContext(ExecutionContext context)
Returns an arguments object for the given execution context with resolved
variables if necessary and possible.
|
Input |
getInput()
Returns the
<input> operand value: the input object to read from |
String |
getPath()
Returns the
<path> operand value (variables are NOT resolved): the file to use as input; wildcards * and ? are supported; relative
paths are resolved on the basis of the current working directory. |
String |
getPath(ExecutionContext context)
Returns the
<path> (variables are resolved): the file to use as input; wildcards * and ? are supported; relative
paths are resolved on the basis of the current working directory. |
boolean |
isInputSet()
Returns true if the
<input> operand has been set. |
boolean |
isPathSet()
Returns true if the
<path> operand has been set. |
void |
setInput(Input input)
Sets
<input>: the input object to read from |
void |
setPath(String path)
Sets
<path>: the file to use as input; wildcards * and ? are supported; relative
paths are resolved on the basis of the current working directory. |
String |
toString()
Returns a string representation of the command arguments and options.
|
public FromArguments()
public FromArguments getForContext(ExecutionContext context)
Argumentsthis arguments instance is simply returned.
If variables are present, they are resolved if such a variable is defined
in the VariableContext returned by
context.getVariableContext().
Values are converted if necessary with the ValueConverters
returned by
context.getValueConverterFor(Class).
getForContext in interface Arguments<FromArguments>context - the execution context providing access to variables and
converterspublic String getPath()
<path> operand value (variables are NOT resolved): the file to use as input; wildcards * and ? are supported; relative
paths are resolved on the basis of the current working directory.<path> operand value (variables are not resolved)IllegalStateException - if this operand has never been setgetPath(ExecutionContext)public String getPath(ExecutionContext context)
<path> (variables are resolved): the file to use as input; wildcards * and ? are supported; relative
paths are resolved on the basis of the current working directory.context - the execution context used to resolve variables<path> operand value after resolving variablesIllegalStateException - if this operand has never been setgetPath()public boolean isPathSet()
<path> operand has been set.
Note that this method returns true even if null was passed to the
setPath(String) method.
<path> operand has
been called at least oncepublic void setPath(String path)
<path>: the file to use as input; wildcards * and ? are supported; relative
paths are resolved on the basis of the current working directory.path - the value for the <path> operandpublic Input getInput()
<input> operand value: the input object to read from<input> operand value (variables are not resolved)IllegalStateException - if this operand has never been setpublic boolean isInputSet()
<input> operand has been set.
Note that this method returns true even if null was passed to the
setInput(org.unix4j.io.Input) method.
<input> operand has
been called at least oncepublic void setInput(Input input)
<input>: the input object to read frominput - the value for the <input> operandpublic String toString()
ArgumentstoString in interface Arguments<FromArguments>toString in class ObjectCopyright © 2017. All Rights Reserved.