|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sam.rules.Syntax
Class describing a rule.
This includes parsing, verbose explainations, etc.
Nested Class Summary | |
protected static class |
Syntax.Resource
Class for specifications of pure resources that are not user-selectable |
Field Summary | |
java.lang.String |
description
A human-readable description of this single Syntax element |
java.lang.String |
name
The name of this single Syntax element |
protected static char |
NON_SELECTABLE_TYPE
Special switch type for abstract syntactic elements that are not really user-selectable |
Constructor Summary | |
protected |
Syntax(char switchType,
java.lang.String name,
java.lang.String description)
Builds a new Syntax element |
Method Summary | |
protected abstract void |
doParse(java.lang.String command)
Really parses a command-line supplied switch |
abstract java.lang.String |
example()
Builds an example for this single Syntax element |
abstract sam.rules.Rule |
getRule()
Gets the Rule specified by this RuleSpecification . |
abstract void |
load(java.util.zip.ZipFile archive)
Loads a Rule from specified archive |
void |
parse(java.lang.String command)
Parses a command-line supplied switch This is a failsafe wrapper to doParse(java.lang.String) |
protected int |
parseInteger(java.lang.String valueSpecifiation,
java.lang.String title,
int min,
int max)
Shortcut for easily parsing an integer |
boolean |
recognizesSwitch(char proposedSwitchType)
Wether this syntax element recognizes proposed switch type |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public final java.lang.String name
Syntax
element
public final java.lang.String description
Syntax
element
protected static final char NON_SELECTABLE_TYPE
Syntax.Resource
,
Constant Field ValuesConstructor Detail |
protected Syntax(char switchType, java.lang.String name, java.lang.String description)
Syntax
element
switchType
- the switchType charactername
- the namedescription
- a human-readable descriptionMethod Detail |
public boolean recognizesSwitch(char proposedSwitchType)
protected abstract void doParse(java.lang.String command)
public final void parse(java.lang.String command)
doParse(java.lang.String)
public abstract void load(java.util.zip.ZipFile archive)
Rule
from specified archive
public abstract sam.rules.Rule getRule()
Rule
specified by this RuleSpecification
.
This might require prompting the user for a correct specification through
the current RulingInterface
public abstract java.lang.String example()
Syntax
element
protected int parseInteger(java.lang.String valueSpecifiation, java.lang.String title, int min, int max)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |