ArgsParserMixin<ArgsParser>
, org.refcodes.mixin.DescriptionAccessor
, org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<ArgsParser>
, org.refcodes.mixin.DescriptionAccessor.DescriptionMutator
, org.refcodes.mixin.DescriptionAccessor.DescriptionProperty
, org.refcodes.mixin.EscapeCodesStatusAccessor
, org.refcodes.mixin.EscapeCodesStatusAccessor.EscapeCodeStatusBuilder<ArgsParser>
, org.refcodes.mixin.EscapeCodesStatusAccessor.EscapeCodeStatusMutator
, org.refcodes.mixin.EscapeCodesStatusAccessor.EscapeCodeStatusProperty
, org.refcodes.mixin.NameAccessor
, org.refcodes.mixin.NameAccessor.NameBuilder<ArgsParser>
, org.refcodes.mixin.NameAccessor.NameMutator
, org.refcodes.mixin.NameAccessor.NameProperty
, org.refcodes.component.Resetable
, org.refcodes.mixin.ResetEscapeCodeAccessor
, org.refcodes.mixin.ResetEscapeCodeAccessor.ResetEscapeCodeBuilder<ArgsParser>
, org.refcodes.mixin.ResetEscapeCodeAccessor.ResetEscapeCodeMutator
, org.refcodes.mixin.ResetEscapeCodeAccessor.ResetEscapeCodeProperty
, RootConditionAccessor
, org.refcodes.textual.TextBoxGridAccessor
, org.refcodes.textual.TextBoxGridAccessor.TextBoxGridBuilder<ArgsParser>
, org.refcodes.textual.TextBoxGridAccessor.TextBoxGridMutator
, org.refcodes.textual.TextBoxGridAccessor.TextBoxGridProperty
, org.refcodes.mixin.TitleAccessor
, org.refcodes.mixin.TitleAccessor.TitleBuilder<ArgsParser>
, org.refcodes.mixin.TitleAccessor.TitleMutator
, org.refcodes.mixin.TitleAccessor.TitleProperty
ArgsParserImpl
public interface ArgsParser extends ArgsParserMixin<ArgsParser>, org.refcodes.mixin.TitleAccessor.TitleProperty, org.refcodes.mixin.TitleAccessor.TitleBuilder<ArgsParser>, org.refcodes.mixin.NameAccessor.NameProperty, org.refcodes.mixin.NameAccessor.NameBuilder<ArgsParser>, org.refcodes.mixin.DescriptionAccessor.DescriptionProperty, org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<ArgsParser>, org.refcodes.component.Resetable, RootConditionAccessor, org.refcodes.mixin.EscapeCodesStatusAccessor.EscapeCodeStatusProperty, org.refcodes.mixin.EscapeCodesStatusAccessor.EscapeCodeStatusBuilder<ArgsParser>, org.refcodes.mixin.ResetEscapeCodeAccessor.ResetEscapeCodeProperty, org.refcodes.mixin.ResetEscapeCodeAccessor.ResetEscapeCodeBuilder<ArgsParser>, org.refcodes.textual.TextBoxGridAccessor.TextBoxGridProperty, org.refcodes.textual.TextBoxGridAccessor.TextBoxGridBuilder<ArgsParser>
ArgsParser
provides means for parsing command line arguments and
constructing a command line utility's help output.org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B extends org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B>>, org.refcodes.mixin.DescriptionAccessor.DescriptionMutator, org.refcodes.mixin.DescriptionAccessor.DescriptionProperty
org.refcodes.mixin.EscapeCodesStatusAccessor.EscapeCodeStatusBuilder<B extends org.refcodes.mixin.EscapeCodesStatusAccessor.EscapeCodeStatusBuilder<B>>, org.refcodes.mixin.EscapeCodesStatusAccessor.EscapeCodeStatusMutator, org.refcodes.mixin.EscapeCodesStatusAccessor.EscapeCodeStatusProperty
org.refcodes.mixin.NameAccessor.NameBuilder<B extends org.refcodes.mixin.NameAccessor.NameBuilder<B>>, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.mixin.NameAccessor.NameProperty
org.refcodes.mixin.ResetEscapeCodeAccessor.ResetEscapeCodeBuilder<B extends org.refcodes.mixin.ResetEscapeCodeAccessor.ResetEscapeCodeBuilder<B>>, org.refcodes.mixin.ResetEscapeCodeAccessor.ResetEscapeCodeMutator, org.refcodes.mixin.ResetEscapeCodeAccessor.ResetEscapeCodeProperty
RootConditionAccessor.RootConditionBuilder<B extends RootConditionAccessor.RootConditionBuilder<B>>, RootConditionAccessor.RootConditionMutator, RootConditionAccessor.RootConditionProperty
org.refcodes.textual.TextBoxGridAccessor.TextBoxGridBuilder<B extends org.refcodes.textual.TextBoxGridAccessor.TextBoxGridBuilder<?>>, org.refcodes.textual.TextBoxGridAccessor.TextBoxGridMutator, org.refcodes.textual.TextBoxGridAccessor.TextBoxGridProperty
Modifier and Type | Method | Description |
---|---|---|
void |
addExampleUsage(String aDescription,
Operand<?>... aOperands) |
Adds a usage example by providing a description of the example and the
command line arguments required by the example.
|
void |
errorLn(String aLine) |
Prints the given line to standard error with regards to to the console
width as specified by the
withConsoleWidth(int) method. |
List<? extends Operand<?>> |
evalArgs(String[] aArgs) |
Evaluates the provided command line arguments and determines the
according values by evaluating the root
Condition . |
default List<? extends Operand<?>> |
evalArgs(List<String> aArgs) |
Same as
evalArgs(String[]) with the difference that the elements
representing the arguments are passed as a list instead of an array. |
String |
getBannerBorderEscapeCode() |
Retrieves the banner's border Escape-Code from the banner border
Escape-Code property.
|
String |
getBannerEscapeCode() |
Retrieves the banner's content Escape-Code from the banner Escape-Code
property.
|
String |
getCopyrightNote() |
Retrieves the copyright.
|
String |
getDescription() |
Retrieves the description.
|
String |
getDescriptionEscapeCode() |
Retrieves the parameter's description Escape-Code from the parameter's
description Escape-Code property.
|
List<ExampleUsage> |
getExampleUsages() |
Retrieves the
ExampleUsage instances as addeed using
addExampleUsage(String, Operand...) . |
String |
getLicenseNote() |
Retrieves the license.
|
String |
getLineSeparatorEscapeCode() |
Retrieves the line separator Escape-Code from the line separator
Escape-Code property.
|
String |
getParameterEscapeCode() |
Retrieves the parameter Escape-Code from the parameter Escape-Code
property.
|
Condition |
getRootCondition() |
The root condition is the starting point node of a
Syntaxable
hierarchy to be traversed when determining the syntax for command line
arguments or when evaluating the command line arguments. |
char |
getSeparatorLnChar() |
Gets the character to be used when printing a separator line with the
printSeparatorLn() method. |
void |
printBanner() |
Prints the banner; the banner most probably is an ASCII_HEADER_ASCII_BODY
art text block which's look depends strongly on the taste of the author
implementing this interface.
|
default void |
printBody() |
Prints the help as of
printHelp() without the banner. |
void |
printCopyrightNote() |
Prints the copyright note as specified by the
withCopyrightNote(String) method; with regards to to the console
width as specified by the withConsoleWidth(int) method. |
void |
printDescription() |
Prints the description as set by the
withDescription(String)
method with regards to the console width as specified by the
withConsoleWidth(int) method. |
void |
printExampleUsages() |
Prints example usages as as added by the
addExampleUsage(String, Operand...) method with regards to the
console width as specified by the withConsoleWidth(int) method. |
default void |
printHelp() |
Prints the help to the standard output specified by the
withStandardOut(PrintStream) method. |
void |
printLicenseNote() |
Prints the license note as specified by the
withLicenseNote(String) method; with regards to to the console
width as specified by the withConsoleWidth(int) method. |
void |
printLn() |
Prints an empty line / a line break.
|
void |
printLn(String aLine) |
Prints the given line to standard out with regards to to the console
width as specified by the
withConsoleWidth(int) method. |
void |
printOptions() |
Prints the
Option s (short- and the long-options), the
Flag es and the Operand and their description with regards
to the console width as specified by the withConsoleWidth(int)
method. |
void |
printSeparatorLn() |
Prints a separator line using the separator character as specified by the
withSeparatorLnChar(char) method; with regards to to the console
width as specified by the withConsoleWidth(int) method. |
void |
printUsage() |
Prints the syntax as retrieved by the root
Condition with regards
to the SyntaxNotation set by the
withSyntaxNotation(SyntaxNotation) method; making use of the
usage label as passed by the withUsageLabel(String) method. |
void |
setBannerBorderEscapeCode(String aBannerBorderEscCode) |
Sets the banner's border Escape-Code for the banner border Escape-Code
property.
|
void |
setBannerEscapeCode(String aBannerEscCode) |
Sets the banner's content Escape-Code for the banner Escape-Code
property.
|
void |
setBannerFont(org.refcodes.textual.Font aBannerFont) |
Sets the banner font.
|
void |
setBannerFontPalette(char[] aColorPalette) |
Sets the banner font palette.
|
void |
setConsoleWidth(int aConsoleWidth) |
Set the console with.
|
void |
setCopyrightNote(String aCopyrightNote) |
Set the copyright note used by the
printHelp() method when
writing out the copyright claim and make other adjustments with the
result (with regards to the Builder-Pattern). |
void |
setDescriptionEscapeCode(String aDescriptionEscCode) |
Sets the description Escape-Code for the description Escape-Code
property.
|
void |
setErrorOut(PrintStream aErrorOut) |
Set the error out
PrintStream and make other adjustments with the
result (with regards to the Builder-Pattern). |
void |
setLicenseNote(String aLicenseNote) |
Set the license note used by the
printHelp() method when writing
out the licensing conditions. |
void |
setLineBreak(String aLineBreak) |
Set the console's line break.
|
void |
setLineSeparatorEscapeCode(String aLineSeparatorEscCode) |
Sets the line separator Escape-Code for the line separator Escape-Code
property.
|
void |
setMaxConsoleWidth(int aMaxConsoleWidth) |
Set the maximum console width to use in case the console width is greater
than the maximum you want.
|
void |
setParameterEscapeCode(String aParamEscCode) |
Sets the parameter Escape-Code for the parameter Escape-Code property.
|
void |
setSeparatorLnChar(char aSeparatorLnChar) |
Set the character to be used when printing a separator line with the
printSeparatorLn() method. |
void |
setStandardOut(PrintStream aStandardOut) |
Set the standard out
PrintStream and make other adjustments with
the result (with regards to the Builder-Pattern). |
void |
setSyntaxNotation(SyntaxNotation aSyntaxNotation) |
Set the
SyntaxNotation . |
void |
setUsageLabel(String aUsageLabel) |
Set the usage label used by the
printHelp() method when writing
out the syntax. |
default ArgsParser |
withBannerBorderEscapeCode(String aBannerBorderEscCode) |
Sets the banner's border Escape-Code for the banner border Escape-Code
property.
|
default ArgsParser |
withBannerEscapeCode(String aBannerEscCode) |
Sets the banner's content Escape-Code for the banner Escape-Code
property.
|
default ArgsParser |
withBannerFont(org.refcodes.textual.Font aBannerFont) |
With banner font.
|
default ArgsParser |
withBannerFontPalette(char[] aColorPalette) |
With banner font palette.
|
default ArgsParser |
withConsoleWidth(int aConsoleWidth) |
Set the console with.
|
default ArgsParser |
withCopyrightNote(String aCopyrightNote) |
Set the copyright note used by the
printHelp() method when
writing out the copyright claim and make other adjustments with the
result (with regards to the Builder-Pattern). |
default ArgsParser |
withDescription(String aDescription) |
With description.
|
default ArgsParser |
withDescriptionEscapeCode(String aDescriptionEscCode) |
Sets the description Escape-Code for the description Escape-Code
property.
|
default ArgsParser |
withErrorOut(PrintStream aErrorOut) |
Set the error out
PrintStream and make other adjustments with the
result (with regards to the Builder-Pattern). |
default ArgsParser |
withEscapeCodesEnabled(boolean isEscCodeEnabled) |
|
default ArgsParser |
withEvalArgs(String[] aArgs) |
Same as
evalArgs(String[]) with the difference that this class's
instance being invoked is returned as of the builder pattern. |
default ArgsParser |
withEvalArgs(List<String> aArgs) |
Same as
evalArgs(List) with the difference that this class's
instance being invoked is returned as of the builder pattern. |
default ArgsParser |
withExampleUsage(String aDescription,
Operand<?>... aOperands) |
Adds a usage example by providing a description of the example and the
command line arguments required by the example.
|
default ArgsParser |
withLicenseNote(String aLicenseNote) |
Set the license note used by the
printHelp() method when writing
out the licensing conditions and make other adjustments with the result
(with regards to the Builder-Pattern). |
default ArgsParser |
withLineBreak(String aLineBreak) |
Set the console's line break.
|
default ArgsParser |
withLineSeparatorEscapeCode(String aLineSeparatorEscCode) |
Sets the line separator Escape-Code for the line separator Escape-Code
property.
|
default ArgsParser |
withMaxConsoleWidth(int aMaxConsoleWidth) |
Set the maximum console width to use in case the console width is greater
than the maximum you want.
|
default ArgsParser |
withName(String aName) |
With name.
|
default ArgsParser |
withParameterEscapeCode(String aParamEscCode) |
Sets the parameter Escape-Code for the parameter Escape-Code property.
|
default ArgsParser |
withResetEscapeCode(String aResetEscCode) |
|
default ArgsParser |
withSeparatorLnChar(char aSeparatorLnChar) |
Set the character to be used when printing a separator line with the
printSeparatorLn() method. |
default ArgsParser |
withStandardOut(PrintStream aStandardOut) |
Set the standard out
PrintStream and make other adjustments with
the result (with regards to the Builder-Pattern). |
default ArgsParser |
withSyntaxNotation(SyntaxNotation aSyntaxNotation) |
Set the
SyntaxNotation and make other adjustments with the result
(with regards to the Builder-Pattern). |
default ArgsParser |
withTextBoxGrid(org.refcodes.textual.TextBoxGrid aTextBoxGrid) |
|
default ArgsParser |
withTitle(String aTitle) |
With title.
|
default ArgsParser |
withUsageLabel(String aUsageLabel) |
Set the usage label used by the
printHelp() method when writing
out the syntax and make other adjustments with the result (with regards
to the Builder-Pattern). |
setDescription
letDescription
setEscapeCodesEnabled
letEscapeCodesEnabled
setResetEscapeCode
letResetEscapeCode
setTextBoxGrid
void errorLn(String aLine)
withConsoleWidth(int)
method.aLine
- The line to be printed.default List<? extends Operand<?>> evalArgs(List<String> aArgs) throws UnknownArgsException, AmbiguousArgsException, SuperfluousArgsException, ParseArgsException
evalArgs(String[])
with the difference that the elements
representing the arguments are passed as a list instead of an array.aArgs
- The command line arguments to be evaluated.Operand
interfaces or its sub-types.UnknownArgsException
- Thrown in case not one command line argument
matched regarding the provided args vs. the expected args.AmbiguousArgsException
- Thrown in case at least one command line
argument is ambiguous regarding expected args vs. provided args.SuperfluousArgsException
- Thrown in case there were arguments
found not being used (superfluous arguments).ParseArgsException
- Thrown in case the provided command line
arguments do not respect the required syntax or cannot be
converted to the required typeList<? extends Operand<?>> evalArgs(String[] aArgs) throws UnknownArgsException, AmbiguousArgsException, SuperfluousArgsException, ParseArgsException
Condition
. In case of
parsing failure, an according exception is thrown. ATTENTION: This method
tests(!) for superfluous command line arguments being passed; e.g.
command line arguments not being evaluated by any of the
Syntaxable
instance being traversed starting at the root
Condition
will be reported. Business logic therefore should
invoke this root node's evalArgs(String[])
method instead of a
Condition
's Syntaxable.parseArgs(String[], String[])
method; as ignoring superfluous command line arguments will cause
unexpected behavior from the point of view of the invoker.aArgs
- The command line arguments to be evaluated.Operand
interfaces or its sub-types.UnknownArgsException
- Thrown in case not one command line argument
matched regarding the provided args vs. the expected args.AmbiguousArgsException
- Thrown in case at least one command line
argument is ambiguous regarding expected args vs. provided args.SuperfluousArgsException
- Thrown in case there were arguments
found not being used (superfluous arguments).ParseArgsException
- Thrown in case the provided command line
arguments do not respect the required syntax or cannot be
converted to the required typeString getCopyrightNote()
String getDescription()
getDescription
in interface org.refcodes.mixin.DescriptionAccessor
String getLicenseNote()
String getDescriptionEscapeCode()
String getParameterEscapeCode()
String getBannerEscapeCode()
String getLineSeparatorEscapeCode()
char getSeparatorLnChar()
printSeparatorLn()
method.printSeparatorLn()
method when printing out the line of
characters..String getBannerBorderEscapeCode()
Condition getRootCondition()
Syntaxable
hierarchy to be traversed when determining the syntax for command line
arguments or when evaluating the command line arguments. Retrieves the root condition from the root condition property.getRootCondition
in interface RootConditionAccessor
Condition
in which's syntax this parser is
based.List<ExampleUsage> getExampleUsages()
ExampleUsage
instances as addeed using
addExampleUsage(String, Operand...)
.ExampleUsage
elements.void addExampleUsage(String aDescription, Operand<?>... aOperands)
aDescription
- The description of the example.aOperands
- The command line arguments used by the example.default ArgsParser withExampleUsage(String aDescription, Operand<?>... aOperands)
aDescription
- The description of the example.aOperands
- The command line arguments used by the example.void printBanner()
default void printBody()
printHelp()
without the banner.void printCopyrightNote()
withCopyrightNote(String)
method; with regards to to the console
width as specified by the withConsoleWidth(int)
method.void printDescription()
withDescription(String)
method with regards to the console width as specified by the
withConsoleWidth(int)
method.void printExampleUsages()
addExampleUsage(String, Operand...)
method with regards to the
console width as specified by the withConsoleWidth(int)
method.default void printHelp()
withStandardOut(PrintStream)
method. This method can make use of
the more atomic methods printBanner()
, printUsage()
,
printDescription()
, printOptions()
or
printSeparatorLn()
to print a help text which's look depends
strongly on the taste of the author implementing this interface. In case
you dislike the implementing author's taste, feel free to overwrite this
method and compose your own help text from the building blocks such as
printBanner()
, printUsage()
,
printDescription()
, printOptions()
or
printSeparatorLn()
void printLicenseNote()
withLicenseNote(String)
method; with regards to to the console
width as specified by the withConsoleWidth(int)
method.void printLn()
void printLn(String aLine)
withConsoleWidth(int)
method.aLine
- The line to be printed.void printOptions()
Option
s (short- and the long-options), the
Flag
es and the Operand
and their description with regards
to the console width as specified by the withConsoleWidth(int)
method.void printSeparatorLn()
withSeparatorLnChar(char)
method; with regards to to the console
width as specified by the withConsoleWidth(int)
method.void printUsage()
Condition
with regards
to the SyntaxNotation
set by the
withSyntaxNotation(SyntaxNotation)
method; making use of the
usage label as passed by the withUsageLabel(String)
method.void setBannerFont(org.refcodes.textual.Font aBannerFont)
aBannerFont
- the new banner fontvoid setBannerFontPalette(char[] aColorPalette)
aColorPalette
- the new banner font palettevoid setConsoleWidth(int aConsoleWidth)
SystemUtility.getTerminalWidth()
value, i.e. the console
width is set automatically to be the width of your terminal.aConsoleWidth
- The width to set or -1 to let the parser
automatically determine the console width.void setCopyrightNote(String aCopyrightNote)
printHelp()
method when
writing out the copyright claim and make other adjustments with the
result (with regards to the Builder-Pattern).aCopyrightNote
- The license note printed out by the
printHelp()
method.void setErrorOut(PrintStream aErrorOut)
PrintStream
and make other adjustments with the
result (with regards to the Builder-Pattern).aErrorOut
- The error out PrintStream
to set.void setLicenseNote(String aLicenseNote)
printHelp()
method when writing
out the licensing conditions.aLicenseNote
- The license note printed out by the
printHelp()
method.void setLineBreak(String aLineBreak)
SystemUtility.getLineBreak()
value.aLineBreak
- the new line breakvoid setMaxConsoleWidth(int aMaxConsoleWidth)
aMaxConsoleWidth
- the new max console widthvoid setDescriptionEscapeCode(String aDescriptionEscCode)
aDescriptionEscCode
- The description Escape-Code to be stored by
the description Escape-Code property.void setParameterEscapeCode(String aParamEscCode)
aParamEscCode
- The parameter Escape-Code to be stored by the
parameter Escape-Code property.void setBannerEscapeCode(String aBannerEscCode)
aBannerEscCode
- The banner Escape-Code to be stored by the banner
Escape-Code property.void setLineSeparatorEscapeCode(String aLineSeparatorEscCode)
aLineSeparatorEscCode
- The line separator Escape-Code to be stored
by the line separator Escape-Code property.void setBannerBorderEscapeCode(String aBannerBorderEscCode)
aBannerBorderEscCode
- The banner border Escape-Code to be stored by
the banner border Escape-Code property.void setSeparatorLnChar(char aSeparatorLnChar)
printSeparatorLn()
method.aSeparatorLnChar
- The character used by the
printSeparatorLn()
method when printing out the line of
characters..void setStandardOut(PrintStream aStandardOut)
PrintStream
and make other adjustments with
the result (with regards to the Builder-Pattern).aStandardOut
- The standard out PrintStream
to set.void setSyntaxNotation(SyntaxNotation aSyntaxNotation)
SyntaxNotation
.aSyntaxNotation
- The SyntaxNotation
to set.void setUsageLabel(String aUsageLabel)
printHelp()
method when writing
out the syntax.aUsageLabel
- The usage label printed out by the
printHelp()
method.default ArgsParser withTextBoxGrid(org.refcodes.textual.TextBoxGrid aTextBoxGrid)
withTextBoxGrid
in interface org.refcodes.textual.TextBoxGridAccessor.TextBoxGridBuilder<ArgsParser>
default ArgsParser withBannerFont(org.refcodes.textual.Font aBannerFont)
aBannerFont
- the banner fontdefault ArgsParser withBannerFontPalette(char[] aColorPalette)
aColorPalette
- the color palettedefault ArgsParser withConsoleWidth(int aConsoleWidth)
SystemUtility.getTerminalWidth()
value.aConsoleWidth
- The width to set.ArgsParser
instance with regard to the builder
pattern.default ArgsParser withCopyrightNote(String aCopyrightNote)
printHelp()
method when
writing out the copyright claim and make other adjustments with the
result (with regards to the Builder-Pattern).aCopyrightNote
- The license note printed out by the
printHelp()
method.ArgsParser
instance with regard to the builder
pattern.default ArgsParser withDescription(String aDescription)
withDescription
in interface org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<ArgsParser>
aDescription
- the descriptiondefault ArgsParser withErrorOut(PrintStream aErrorOut)
PrintStream
and make other adjustments with the
result (with regards to the Builder-Pattern).aErrorOut
- The error out PrintStream
to set.ArgsParser
instance with regard to the builder
pattern.default ArgsParser withEscapeCodesEnabled(boolean isEscCodeEnabled)
withEscapeCodesEnabled
in interface org.refcodes.mixin.EscapeCodesStatusAccessor.EscapeCodeStatusBuilder<ArgsParser>
default ArgsParser withEvalArgs(List<String> aArgs) throws UnknownArgsException, AmbiguousArgsException, SuperfluousArgsException, ParseArgsException
evalArgs(List)
with the difference that this class's
instance being invoked is returned as of the builder pattern.withEvalArgs
in interface ArgsParserMixin<ArgsParser>
aArgs
- The command line arguments to be evaluated.UnknownArgsException
- Thrown in case not one command line argument
matched regarding the provided args vs. the expected args.AmbiguousArgsException
- Thrown in case at least one command line
argument is ambiguous regarding expected args vs. provided args.SuperfluousArgsException
- Thrown in case there were arguments
found not being used (superfluous arguments).ParseArgsException
- Thrown in case the provided command line
arguments do not respect the required syntax or cannot be
converted to the required typedefault ArgsParser withLicenseNote(String aLicenseNote)
printHelp()
method when writing
out the licensing conditions and make other adjustments with the result
(with regards to the Builder-Pattern).aLicenseNote
- The license note printed out by the
printHelp()
method.ArgsParser
instance with regard to the builder
pattern.default ArgsParser withLineBreak(String aLineBreak)
SystemUtility.getLineBreak()
value.aLineBreak
- the line breakArgsParser
instance with regard to the builder
pattern.default ArgsParser withMaxConsoleWidth(int aMaxConsoleWidth)
aMaxConsoleWidth
- the max console widthArgsParser
instance with regard to the builder
pattern.default ArgsParser withName(String aName)
withName
in interface org.refcodes.mixin.NameAccessor.NameBuilder<ArgsParser>
aName
- the namedefault ArgsParser withDescriptionEscapeCode(String aDescriptionEscCode)
aDescriptionEscCode
- The parameter's description Escape-Code to be
stored by the parameter's description Escape-Code property.default ArgsParser withParameterEscapeCode(String aParamEscCode)
aParamEscCode
- The parameter Escape-Code to be stored by the
parameter Escape-Code property.default ArgsParser withBannerEscapeCode(String aBannerEscCode)
aBannerEscCode
- The banner Escape-Code to be stored by the banner
Escape-Code property.default ArgsParser withLineSeparatorEscapeCode(String aLineSeparatorEscCode)
aLineSeparatorEscCode
- The line separator Escape-Code to be stored
by the line separator Escape-Code property.default ArgsParser withBannerBorderEscapeCode(String aBannerBorderEscCode)
aBannerBorderEscCode
- The banner border Escape-Code to be stored by
the banner border Escape-Code property.default ArgsParser withEvalArgs(String[] aArgs) throws UnknownArgsException, AmbiguousArgsException, SuperfluousArgsException, ParseArgsException
evalArgs(String[])
with the difference that this class's
instance being invoked is returned as of the builder pattern.withEvalArgs
in interface ArgsParserMixin<ArgsParser>
aArgs
- The command line arguments to be evaluated.UnknownArgsException
- Thrown in case not one command line argument
matched regarding the provided args vs. the expected args.AmbiguousArgsException
- Thrown in case at least one command line
argument is ambiguous regarding expected args vs. provided args.SuperfluousArgsException
- Thrown in case there were arguments
found not being used (superfluous arguments).ParseArgsException
- Thrown in case the provided command line
arguments do not respect the required syntax or cannot be
converted to the required typedefault ArgsParser withResetEscapeCode(String aResetEscCode)
withResetEscapeCode
in interface org.refcodes.mixin.ResetEscapeCodeAccessor.ResetEscapeCodeBuilder<ArgsParser>
default ArgsParser withSeparatorLnChar(char aSeparatorLnChar)
printSeparatorLn()
method.aSeparatorLnChar
- The character used by the
printSeparatorLn()
method when printing out the line of
characters..ArgsParser
instance with regard to the builder
pattern.default ArgsParser withStandardOut(PrintStream aStandardOut)
PrintStream
and make other adjustments with
the result (with regards to the Builder-Pattern).aStandardOut
- The standard out PrintStream
to set.ArgsParser
instance with regard to the builder
pattern.default ArgsParser withSyntaxNotation(SyntaxNotation aSyntaxNotation)
SyntaxNotation
and make other adjustments with the result
(with regards to the Builder-Pattern).aSyntaxNotation
- The SyntaxNotation
to set.ArgsParser
instance with regard to the builder
pattern.default ArgsParser withTitle(String aTitle)
withTitle
in interface org.refcodes.mixin.TitleAccessor.TitleBuilder<ArgsParser>
aTitle
- the titledefault ArgsParser withUsageLabel(String aUsageLabel)
printHelp()
method when writing
out the syntax and make other adjustments with the result (with regards
to the Builder-Pattern).aUsageLabel
- The usage label printed out by the
printHelp()
method.ArgsParser
instance with regard to the builder
pattern.Copyright © 2021. All rights reserved.