|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.jparam.paramset.ParamSet
This class helps in parsing and handling user input from the command line, you can define sets of parameters, give them types and binding information and use this to read the entire input as a whole
Constructor Summary | |
ParamSet()
Create an empty ParamSet object. |
|
ParamSet(java.lang.String description)
Create a ParamSet object with the given general description, and no parameters. |
Method Summary | |
void |
addParam(Param param)
Adds the given parameter to the set. |
void |
check()
Checks that all parameters have values. |
void |
clearValues()
|
void |
feedback_enabled(boolean b)
|
java.lang.String |
getDescription()
Returns the ParamSet's general description |
Param |
getParam(java.lang.String name)
Returns the parameter with the given name, or null if no such parameter exists. |
java.util.Collection |
getParams()
Returns all parameters |
void |
ignore_unexpected(boolean b)
|
java.lang.String |
info()
Returns a human readable description of the ParamSet, including all parameters |
void |
input(java.io.InputStream in)
Reads values for all input parameter from given InputStream. |
void |
input(java.io.InputStream in,
boolean check)
Reads values for all input parameter from given InputStream. |
void |
input(java.lang.String[] args)
Reads values for all input parameter from 'args'. |
void |
input(java.lang.String[] args,
boolean check)
Reads values for all input parameter from 'args'. |
void |
max_feedback_length(int i)
|
void |
notifyAssignment(java.lang.String name,
TreeNode value)
Called by parser for each assignemnt to value set. |
void |
output()
Writes all output parameters to outStream |
void |
output(java.io.PrintStream out)
Writes all output parameters to given PrintStream. |
void |
set_feedback_stream(java.io.PrintStream ps)
|
void |
setDescription(java.lang.String description)
Sets the ParamSet's general description |
void |
setOutput(java.io.PrintStream outStream)
|
void |
warning_is_error(boolean b)
|
void |
write_feedback()
|
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public ParamSet()
public ParamSet(java.lang.String description)
Method Detail |
public void clearValues()
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public void addParam(Param param) throws JParamException
public Param getParam(java.lang.String name) throws MatchException
public java.util.Collection getParams()
public java.lang.String info()
public void input(java.io.InputStream in) throws JParamException
public void input(java.io.InputStream in, boolean check) throws JParamException
public void input(java.lang.String[] args) throws JParamException
public void input(java.lang.String[] args, boolean check) throws JParamException
public void check() throws JParamException
public void output() throws JParamException
public void output(java.io.PrintStream out) throws JParamException
public void write_feedback()
public void notifyAssignment(java.lang.String name, TreeNode value) throws JParamException
notifyAssignment
in interface AssignmentListener
public void setOutput(java.io.PrintStream outStream)
public void warning_is_error(boolean b)
public void ignore_unexpected(boolean b)
public void feedback_enabled(boolean b)
public void max_feedback_length(int i)
public void set_feedback_stream(java.io.PrintStream ps)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |