- All Implemented Interfaces:
Serializable
,Comparable<SyntaxNotation>
,Constable
,ArgumentPrefixAccessor
,ArgumentSuffixAccessor
,LongOptionPrefixAccessor
,ShortOptionPrefixAccessor
,SyntaxMetrics
The
SyntaxNotation
is used by a the
Constituent.toSyntax(CliContext)
method to determine which notation
to be used for the generated syntax.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface org.refcodes.cli.ArgumentPrefixAccessor
ArgumentPrefixAccessor.ArgumentPrefixBuilder<B extends ArgumentPrefixAccessor.ArgumentPrefixBuilder<B>>, ArgumentPrefixAccessor.ArgumentPrefixMutator, ArgumentPrefixAccessor.ArgumentPrefixProperty
Nested classes/interfaces inherited from interface org.refcodes.cli.ArgumentSuffixAccessor
ArgumentSuffixAccessor.ArgumentSuffixBuilder<B extends ArgumentSuffixAccessor.ArgumentSuffixBuilder<B>>, ArgumentSuffixAccessor.ArgumentSuffixMutator, ArgumentSuffixAccessor.ArgumentSuffixProperty
Nested classes/interfaces inherited from interface org.refcodes.cli.LongOptionPrefixAccessor
LongOptionPrefixAccessor.LongOptionPrefixBuilder<B extends LongOptionPrefixAccessor.LongOptionPrefixBuilder<B>>, LongOptionPrefixAccessor.LongOptionPrefixMutator, LongOptionPrefixAccessor.LongOptionPrefixProperty
Nested classes/interfaces inherited from interface org.refcodes.cli.ShortOptionPrefixAccessor
ShortOptionPrefixAccessor.ShortOptionPrefixBuilder<B extends ShortOptionPrefixAccessor.ShortOptionPrefixBuilder<B>>, ShortOptionPrefixAccessor.ShortOptionPrefixMutator, ShortOptionPrefixAccessor.ShortOptionPrefixProperty
-
Enum Constant Summary
Enum ConstantDescriptionA syntax notation derived from GNU and POSIX utility conventions and utility argument syntax.A notation which the author of this code believes to unambiguously describe a command line utility's argument syntax; as defined by the means of thisrefcodes-cli
artifact.A verbose notation using words instead of single character symbols.A notation which tries to mimicCMD
's notation and in case of lack ofCMD
notation conventions, theGNU_POSIX
equivalent is used. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the symbol for representing an ALL condition.Retrieves the symbol for representing an AND condition.Retrieves the symbol for representing an OPTIONAL condition.Retrieves the argument prefix from the argument prefix property.Retrieves the argument suffix from the argument suffix property.Retrieves the symbol representing the beginning of an array, e.g. an opening square brace.Retrieves the symbol representing the beginning of a list, e.g. an opening brace.Retrieves the symbol representing the beginning of optional elements, e.g. an opening square brace.Retrieves the symbol representing the beginning of a range, e.g. an opening curly brace.Retrieves the symbol for representing an EMPTY condition (no args).Retrieves the symbol representing the end of an array, e.g. a closing square brace.Retrieves the symbol representing the end of a list, e.g. a closing brace.Retrieves the symbol representing the end of optional elements, e.g. a closing square brace.Retrieves the symbol representing the end of a range, e.g. a closing curly brace.Retrieves the symbol representing an interval, e.g. "..." or "-".Retrieves the long option prefix from the long option prefix property.Retrieves the symbol for representing an OR condition.Retrieves the short option prefix from the short option prefix property.Retrieves the symbol for representing an XOR condition.static SyntaxNotation
toSyntaxNotation
(String aValue) Retrieves aSyntaxNotation
depending on the given string, ignoring the case as well as being graceful regarding "-" and "_",.static SyntaxNotation
Returns the enum constant of this class with the specified name.static SyntaxNotation[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface org.refcodes.cli.SyntaxMetrics
toOptionPrefixes
-
Enum Constant Details
-
LOGICAL
A notation which the author of this code believes to unambiguously describe a command line utility's argument syntax; as defined by the means of thisrefcodes-cli
artifact. -
GNU_POSIX
A syntax notation derived from GNU and POSIX utility conventions and utility argument syntax.- See Also:
-
- "http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html"
- "http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html"
-
WINDOWS
A notation which tries to mimicCMD
's notation and in case of lack ofCMD
notation conventions, theGNU_POSIX
equivalent is used. -
VERBOSE
A verbose notation using words instead of single character symbols.
-
-
Field Details
-
DEFAULT
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getArgumentPrefix
Retrieves the argument prefix from the argument prefix property.- Specified by:
getArgumentPrefix
in interfaceArgumentPrefixAccessor
- Returns:
- The argument prefix stored by the argument prefix property.
-
getArgumentSuffix
Retrieves the argument suffix from the argument suffix property.- Specified by:
getArgumentSuffix
in interfaceArgumentSuffixAccessor
- Returns:
- The argument suffix stored by the argument suffix property.
-
getShortOptionPrefix
Retrieves the short option prefix from the short option prefix property.- Specified by:
getShortOptionPrefix
in interfaceShortOptionPrefixAccessor
- Returns:
- The short option prefix stored by the short option prefix property.
-
getLongOptionPrefix
Retrieves the long option prefix from the long option prefix property.- Specified by:
getLongOptionPrefix
in interfaceLongOptionPrefixAccessor
- Returns:
- The long option prefix stored by the long option prefix property.
-
getBeginListSymbol
Retrieves the symbol representing the beginning of a list, e.g. an opening brace.- Specified by:
getBeginListSymbol
in interfaceSyntaxMetrics
- Returns:
- The symbol representing the beginning of a list.
-
getEndListSymbol
Retrieves the symbol representing the end of a list, e.g. a closing brace.- Specified by:
getEndListSymbol
in interfaceSyntaxMetrics
- Returns:
- The symbol representing the end of a list.
-
getBeginArraySymbol
Retrieves the symbol representing the beginning of an array, e.g. an opening square brace.- Specified by:
getBeginArraySymbol
in interfaceSyntaxMetrics
- Returns:
- The symbol representing the beginning of an array.
-
getBeginRangeSymbol
Retrieves the symbol representing the beginning of a range, e.g. an opening curly brace.- Specified by:
getBeginRangeSymbol
in interfaceSyntaxMetrics
- Returns:
- The symbol representing the beginning of a range.
-
getEndArraySymbol
Retrieves the symbol representing the end of an array, e.g. a closing square brace.- Specified by:
getEndArraySymbol
in interfaceSyntaxMetrics
- Returns:
- The symbol representing the end of an array.
-
getEndRangeSymbol
Retrieves the symbol representing the end of a range, e.g. a closing curly brace.- Specified by:
getEndRangeSymbol
in interfaceSyntaxMetrics
- Returns:
- The symbol representing the end of a range.
-
getIntervalSymbol
Retrieves the symbol representing an interval, e.g. "..." or "-".- Specified by:
getIntervalSymbol
in interfaceSyntaxMetrics
- Returns:
- The symbol representing an interval.
-
getXorSymbol
Retrieves the symbol for representing an XOR condition.- Specified by:
getXorSymbol
in interfaceSyntaxMetrics
- Returns:
- The according XOR symbol.
-
getOrSymbol
Retrieves the symbol for representing an OR condition.- Specified by:
getOrSymbol
in interfaceSyntaxMetrics
- Returns:
- The according OR symbol.
-
getAndSymbol
Retrieves the symbol for representing an AND condition.- Specified by:
getAndSymbol
in interfaceSyntaxMetrics
- Returns:
- The according AND symbol.
-
getEmptySymbol
Retrieves the symbol for representing an EMPTY condition (no args).- Specified by:
getEmptySymbol
in interfaceSyntaxMetrics
- Returns:
- The according EMPTY symbol.
-
getAllSymbol
Retrieves the symbol for representing an ALL condition.- Specified by:
getAllSymbol
in interfaceSyntaxMetrics
- Returns:
- The according ALL symbol.
-
getBeginOptionalSymbol
Retrieves the symbol representing the beginning of optional elements, e.g. an opening square brace.- Specified by:
getBeginOptionalSymbol
in interfaceSyntaxMetrics
- Returns:
- The symbol representing the beginning of optional elements.
-
getEndOptionalSymbol
Retrieves the symbol representing the end of optional elements, e.g. a closing square brace.- Specified by:
getEndOptionalSymbol
in interfaceSyntaxMetrics
- Returns:
- The symbol representing the end of a optional elements.
-
getAnySymbol
Retrieves the symbol for representing an OPTIONAL condition.- Specified by:
getAnySymbol
in interfaceSyntaxMetrics
- Returns:
- The according OPTIONAL symbol.
-
toSyntaxNotation
Retrieves aSyntaxNotation
depending on the given string, ignoring the case as well as being graceful regarding "-" and "_",.- Parameters:
aValue
- The name of theSyntaxNotation
to be interpreted graceful.- Returns:
- The
SyntaxNotation
being determined or null if none was found.
-