public interface Environment
| Modifier and Type | Method and Description |
|---|---|
void |
acquireValue(Parameter par)
Obtains a legal value for a given parameter from the environment and
sets the parameter's value accordingly.
|
void |
clearValue(Parameter par)
Clears a value for a given parameter.
|
java.io.PrintStream |
getErrorStream()
Returns an output stream into which error or logging output from
a task can be written.
|
java.lang.String[] |
getNames()
Returns an array of parameter names which have been specified.
|
java.io.PrintStream |
getOutputStream()
Returns an output stream into which text output from a task can
be written.
|
void acquireValue(Parameter par) throws TaskException
This environment should obtain a value for the parameter par
in whatever way it sees fit, and must then call par's
Parameter.setValueFromString(uk.ac.starlink.task.Environment, java.lang.String) method so that the parameter
knows what its new value is. If the setValueFromString call
throws a ParameterValueException the environment may
try to get another value (for instance by re-prompting the user)
or may give up and re-throw the exception.
par - the Parameter whose value is to be obtained and setTaskExceptionvoid clearValue(Parameter par)
par - the Parameter whose value is to be clearedjava.lang.String[] getNames()
java.io.PrintStream getOutputStream()
java.io.PrintStream getErrorStream()
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.