Enum Class SyntaxNotation
- All Implemented Interfaces:
Serializable,Comparable<SyntaxNotation>,Constable,ArgumentPrefixAccessor,ArgumentSuffixAccessor,LongOptionPrefixAccessor,ShortOptionPrefixAccessor,SyntaxMetrics
The
SyntaxNotation is used by a the Term.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.ArgumentPrefixPropertyNested classes/interfaces inherited from interface org.refcodes.cli.ArgumentSuffixAccessor
ArgumentSuffixAccessor.ArgumentSuffixBuilder<B extends ArgumentSuffixAccessor.ArgumentSuffixBuilder<B>>, ArgumentSuffixAccessor.ArgumentSuffixMutator, ArgumentSuffixAccessor.ArgumentSuffixPropertyNested classes/interfaces inherited from interface org.refcodes.cli.LongOptionPrefixAccessor
LongOptionPrefixAccessor.LongOptionPrefixBuilder<B extends LongOptionPrefixAccessor.LongOptionPrefixBuilder<B>>, LongOptionPrefixAccessor.LongOptionPrefixMutator, LongOptionPrefixAccessor.LongOptionPrefixPropertyNested classes/interfaces inherited from interface org.refcodes.cli.ShortOptionPrefixAccessor
ShortOptionPrefixAccessor.ShortOptionPrefixBuilder<B extends ShortOptionPrefixAccessor.ShortOptionPrefixBuilder<B>>, ShortOptionPrefixAccessor.ShortOptionPrefixMutator, ShortOptionPrefixAccessor.ShortOptionPrefixProperty -
Enum Constant Summary
Enum ConstantsEnum 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-cliartifact.A verbose notation using words instead of single character symbols.A notation which tries to mimicCMD's notation and in case of lack ofCMDnotation conventions, theGNU_POSIXequivalent is used. -
Field Summary
Fields -
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 SyntaxNotationtoSyntaxNotation(String aValue) Retrieves aSyntaxNotationdepending on the given string, ignoring the case as well as being graceful regarding "-" and "_",.static SyntaxNotationReturns 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, valueOfMethods inherited from interface org.refcodes.cli.SyntaxMetrics
toOptionPrefixes
-
Enum Constant Details
-
GNU_POSIX
A syntax notation derived from GNU and POSIX utility conventions and utility argument syntax.- See Also:
-
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-cliartifact. -
VERBOSE
A verbose notation using words instead of single character symbols. -
WINDOWS
A notation which tries to mimicCMD's notation and in case of lack ofCMDnotation conventions, theGNU_POSIXequivalent is used.
-
-
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
-
getAllSymbol
Retrieves the symbol for representing an ALL condition.- Specified by:
getAllSymbolin interfaceSyntaxMetrics- Returns:
- The according ALL symbol.
-
getAndSymbol
Retrieves the symbol for representing an AND condition.- Specified by:
getAndSymbolin interfaceSyntaxMetrics- Returns:
- The according AND symbol.
-
getAnySymbol
Retrieves the symbol for representing an OPTIONAL condition.- Specified by:
getAnySymbolin interfaceSyntaxMetrics- Returns:
- The according OPTIONAL symbol.
-
getArgumentPrefix
Retrieves the argument prefix from the argument prefix property.- Specified by:
getArgumentPrefixin interfaceArgumentPrefixAccessor- Returns:
- The argument prefix stored by the argument prefix property.
-
getArgumentSuffix
Retrieves the argument suffix from the argument suffix property.- Specified by:
getArgumentSuffixin interfaceArgumentSuffixAccessor- Returns:
- The argument suffix stored by the argument suffix property.
-
getBeginArraySymbol
Retrieves the symbol representing the beginning of an array, e.g. an opening square brace.- Specified by:
getBeginArraySymbolin interfaceSyntaxMetrics- Returns:
- The symbol representing the beginning of an array.
-
getBeginListSymbol
Retrieves the symbol representing the beginning of a list, e.g. an opening brace.- Specified by:
getBeginListSymbolin interfaceSyntaxMetrics- Returns:
- The symbol representing the beginning of a list.
-
getBeginOptionalSymbol
Retrieves the symbol representing the beginning of optional elements, e.g. an opening square brace.- Specified by:
getBeginOptionalSymbolin interfaceSyntaxMetrics- Returns:
- The symbol representing the beginning of optional elements.
-
getBeginRangeSymbol
Retrieves the symbol representing the beginning of a range, e.g. an opening curly brace.- Specified by:
getBeginRangeSymbolin interfaceSyntaxMetrics- Returns:
- The symbol representing the beginning of a range.
-
getEmptySymbol
Retrieves the symbol for representing an EMPTY condition (no args).- Specified by:
getEmptySymbolin interfaceSyntaxMetrics- Returns:
- The according EMPTY symbol.
-
getEndArraySymbol
Retrieves the symbol representing the end of an array, e.g. a closing square brace.- Specified by:
getEndArraySymbolin interfaceSyntaxMetrics- Returns:
- The symbol representing the end of an array.
-
getEndListSymbol
Retrieves the symbol representing the end of a list, e.g. a closing brace.- Specified by:
getEndListSymbolin interfaceSyntaxMetrics- Returns:
- The symbol representing the end of a list.
-
getEndOptionalSymbol
Retrieves the symbol representing the end of optional elements, e.g. a closing square brace.- Specified by:
getEndOptionalSymbolin interfaceSyntaxMetrics- Returns:
- The symbol representing the end of a optional elements.
-
getEndRangeSymbol
Retrieves the symbol representing the end of a range, e.g. a closing curly brace.- Specified by:
getEndRangeSymbolin interfaceSyntaxMetrics- Returns:
- The symbol representing the end of a range.
-
getIntervalSymbol
Retrieves the symbol representing an interval, e.g. "..." or "-".- Specified by:
getIntervalSymbolin interfaceSyntaxMetrics- Returns:
- The symbol representing an interval.
-
getLongOptionPrefix
Retrieves the long option prefix from the long option prefix property.- Specified by:
getLongOptionPrefixin interfaceLongOptionPrefixAccessor- Returns:
- The long option prefix stored by the long option prefix property.
-
getOrSymbol
Retrieves the symbol for representing an OR condition.- Specified by:
getOrSymbolin interfaceSyntaxMetrics- Returns:
- The according OR symbol.
-
getShortOptionPrefix
Retrieves the short option prefix from the short option prefix property.- Specified by:
getShortOptionPrefixin interfaceShortOptionPrefixAccessor- Returns:
- The short option prefix stored by the short option prefix property.
-
getXorSymbol
Retrieves the symbol for representing an XOR condition.- Specified by:
getXorSymbolin interfaceSyntaxMetrics- Returns:
- The according XOR symbol.
-
toSyntaxNotation
Retrieves aSyntaxNotationdepending on the given string, ignoring the case as well as being graceful regarding "-" and "_",.- Parameters:
aValue- The name of theSyntaxNotationto be interpreted graceful.- Returns:
- The
SyntaxNotationbeing determined or null if none was found.
-