Package | Description |
---|---|
com.hp.util.syntax |
Collection of facilities to translate a set of command-line arguments into amap of name-to-object bindings, using an XML-encoded set of syntaxdefinitions.
|
com.hp.util.syntax.parsers |
Set of interfaces and several built-in implementations for parsers andconstraints which define a framework for extension of the command-line parsingframework.
|
Modifier and Type | Method and Description |
---|---|
Parameters |
SyntaxMatch.parameters()
Returns the parsed set of parameters associated with the match.
|
Modifier and Type | Method and Description |
---|---|
void |
Parameters.add(Parameters parameters)
Adds all bindings from the given parameter map to this parameter map.
|
void |
SyntaxFragment.applyDefaults(Parameters parameters)
Scans through all floating and anchored nodes of the node and if the
value of the parameter is not already in the map, it places an entry in
the map using the default parameter value of the, if one is specified.
|
Syntax |
SyntaxMatcher.getMatchingSyntax(String[] args,
Parameters parameters)
Matches command-line arguments against pre-compiled set of syntaxes.
|
boolean |
SyntaxParameter.matches(String[] args,
Parameters parameters,
Parameters committedParameters,
ParsePosition position,
ParsePosition start,
SyntaxPosition farthestMismatchPosition,
boolean indexParameters)
Returns true if the node matches the given arguments starting with the
specified position.
|
boolean |
Syntax.matches(String[] args,
Parameters parameters,
Parameters committedParameters,
ParsePosition position,
ParsePosition start,
SyntaxPosition farthestMismatchPosition,
boolean indexParameters)
Returns true if the node matches the given arguments starting with the
specified position.
|
boolean |
SyntaxFragment.matches(String[] args,
Parameters parameters,
Parameters committedParameters,
ParsePosition position,
ParsePosition start,
SyntaxPosition farthestMismatchPosition,
boolean indexParameters)
Returns true if the node matches the given arguments starting with the
specified position.
|
boolean |
SyntaxKeyword.matches(String[] args,
Parameters parameters,
Parameters committedParameters,
ParsePosition position,
ParsePosition start,
SyntaxPosition farthestMismatchPosition,
boolean indexParameters)
Returns true if the node matches the given arguments starting with the
specified position.
|
boolean |
SyntaxNode.matches(String[] args,
Parameters parameters,
Parameters committedParameters,
ParsePosition position,
ParsePosition start,
SyntaxPosition farthestMismatchPosition,
boolean indexParameters)
Returns true if the node matches the given arguments starting with the
specified position.
|
protected boolean |
SyntaxFragment.matchesAnchor(String[] args,
Parameters parameters,
Parameters committedParameters,
ParsePosition position,
ParsePosition start,
SyntaxPosition farthestMismatchPosition,
boolean indexParameters)
Returns true if the currently parsed argument matches the next anchored
positional syntax node.
|
protected boolean |
SyntaxFragment.matchesFloater(String[] args,
Parameters parameters,
Parameters committedParameters,
ParsePosition position,
SyntaxPosition farthestMismatchPosition,
boolean indexParameters)
Returns true if the currently parsed argument matches any floating,
non-positional syntax node.
|
protected boolean |
SyntaxFragment.matchesOnce(String[] args,
Parameters parameters,
Parameters committedParameters,
ParsePosition position,
ParsePosition start,
SyntaxPosition farthestMismatchPosition,
boolean indexParameters)
Returns true if the fragment matches once the given arguments starting
with the specified position.
|
Constructor and Description |
---|
SyntaxMatch(Parameters parameters,
Syntax syntax,
String[] args,
SyntaxRepository repo)
Creates a new syntax match with the given set of parameters and syntax
associated with it.
|
Modifier and Type | Method and Description |
---|---|
Serializable |
NumberParameterParser.parse(String token,
Constraints constraints,
Parameters soFar)
Returns a non-null object if the parsing of the given token was
succesful and if the object value complied with the specified
constraints, if any were specified.
|
Serializable |
NameValueParameterParser.parse(String token,
Constraints constraints,
Parameters soFar)
Returns a non-null object if the parsing of the given token was
succesful and if the object value complied with the specified
constraints, if any were specified.
|
Serializable |
StringParameterParser.parse(String token,
Constraints constraints,
Parameters soFar)
Returns a non-null object if the parsing of the given token was
succesful and if the object value complied with the specified
constraints, if any were specified.
|
Serializable |
ListParameterParser.parse(String tokens,
Constraints constraints,
Parameters soFar)
Returns a non-null List of objects if the parsing of the given tokens
string was succesful and if each of the list item objects complied with
the specified constraints, if any were specified.
|
Serializable |
BooleanParameterParser.parse(String token,
Constraints constraints,
Parameters parameters)
Returns a non-null object if the parsing of the given token was
succesful and if the object value complied with the specified
constraints, if any were specified.
|
Serializable |
FileParameterParser.parse(String token,
Constraints constraints,
Parameters soFar)
Returns a non-null object if the parsing of the given token was
succesful and if the object value complied with the specified
constraints, if any were specified.
|
Serializable |
DateParameterParser.parse(String token,
Constraints constraints,
Parameters soFar)
Returns a non-null object if the parsing of the given token was
succesful and if the object value complied with the specified
constraints, if any were specified.
|
Serializable |
ParameterParser.parse(String token,
Constraints constraints,
Parameters soFar)
Returns a non-null object if the parsing of the given token was
succesful and if the object value complied with the specified
constraints, if any were specified.
|
protected abstract Serializable |
ListParameterParser.parseItem(String token,
Constraints constraints,
Parameters soFar)
Returns the parsed object corresponding to the given list item.
|
Serializable |
DateListParameterParser.parseItem(String token,
Constraints constraints,
Parameters soFar)
Returns the parsed object corresponding to the given list item, which
in this case is a
Date instance represented by the
token. |
Serializable |
NumberListParameterParser.parseItem(String token,
Constraints constraints,
Parameters soFar)
Returns the parsed object corresponding to the given list item, which
in this case is a
Number instance represented by the token. |
Serializable |
StringListParameterParser.parseItem(String token,
Constraints constraints,
Parameters soFar)
Returns the parsed object corresponding to the given list item, which
in this case is the token itself.
|
Copyright © 2016. All Rights Reserved.