|
org.netbeans.modules.sendopts/2 2.22 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.spi.sendopts.Env
public final class Env
Represents the environment an OptionProcessor operates in. Streams can be
used to read and write data provided by the user. It is also possible
to obtain current user directory. In future this class may be extended
with additional new getters that will describe the operating environment
in greater detail.
| Method Summary | |
|---|---|
File |
getCurrentDirectory()
The directory relative file operations shall be relative to. |
PrintStream |
getErrorStream()
Get an output stream to which error messages may be sent. |
InputStream |
getInputStream()
Get an input stream that may supply additional data. |
PrintStream |
getOutputStream()
Get an output stream to which data may be sent. |
void |
usage()
Prints the help usage for current set of options. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public PrintStream getOutputStream()
public PrintStream getErrorStream()
public File getCurrentDirectory()
CommandLine.
public InputStream getInputStream()
public void usage()
public class MyOptions implementsThis method finds associatedArgsProcessor{@Arg(longName="help") public boolean help;@Overridepublic void process(Envenv) { if (help) env.usage(); } }
CommandLine and calls its
usage method to print
the help text to getOutputStream().
|
org.netbeans.modules.sendopts/2 2.22 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||