|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jargp.ParameterDef
Base class for command line parameter definitions. This is used for simple command line parameters of various flavors. Subclasses define the particular types of parameters supported.
Field Summary | |
protected char |
m_char
Argument flag character. |
protected java.lang.String |
m_description
Argument description text. |
protected java.lang.reflect.Field |
m_field
Information for field linked to parameter. |
protected java.lang.String |
m_name
Name of field holding parameter value. |
Constructor Summary | |
protected |
ParameterDef(char chr,
java.lang.String name,
java.lang.String desc)
Constructor |
Method Summary | |
protected void |
bindToClass(java.lang.Class clas)
Bind parameter to target class field. |
java.lang.String |
getAbbreviation()
Get text abbreviation for parameter. |
java.lang.String |
getDescription()
Get text of parameter description. |
char |
getFlag()
Get flag character for parameter. |
abstract void |
handle(ArgumentProcessor proc)
Handle argument. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final char m_char
protected final java.lang.String m_name
protected final java.lang.String m_description
protected java.lang.reflect.Field m_field
Constructor Detail |
protected ParameterDef(char chr, java.lang.String name, java.lang.String desc)
chr
- parameter flag charactername
- field name for parameterdesc
- discription text for parameter (may be null
)
java.lang.IllegalArgumentException
- if the field is not accessibleMethod Detail |
public java.lang.String getAbbreviation()
public char getFlag()
public java.lang.String getDescription()
IOException
- on file access errorprotected void bindToClass(java.lang.Class clas)
clas
- target class for saving parameter valuespublic abstract void handle(ArgumentProcessor proc)
proc
- argument processor making call to handler
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |