Package picocli
Class CommandLine.Model.ParserSpec
java.lang.Object
picocli.CommandLine.Model.ParserSpec
- Enclosing class:
CommandLine.Model
Models parser configuration specification.
- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private boolean
private boolean
private boolean
private Character
private boolean
private boolean
(package private) static final String
(package private) static final String
Constant String holding the default separator between options and option parameters:"="
.private String
private boolean
private boolean
private boolean
private boolean
private String
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
abbreviatedOptionsAllowed
(boolean abbreviatedOptionsAllowed) boolean
abbreviatedSubcommandsAllowed
(boolean abbreviatedSubcommandsAllowed) boolean
allowOptionsAsOptionParameters
(boolean allowOptionsAsOptionParameters) boolean
allowSubcommandsAsOptionParameters
(boolean allowSubcommandsAsOptionParameters) boolean
Returns true if options with attached arguments should not consume subsequent arguments and should not validate arity.aritySatisfiedByAttachedOptionParam
(boolean newValue) Returns true if options with attached arguments should not consume subsequent arguments and should not validate arity.atFileCommentChar
(Character atFileCommentChar) boolean
caseInsensitiveEnumValuesAllowed
(boolean caseInsensitiveEnumValuesAllowed) boolean
Returns true if exceptions during parsing should be collected instead of thrown.collectErrors
(boolean collectErrors) Sets whether exceptions during parsing should be collected instead of thrown.endOfOptionsDelimiter
(String delimiter) boolean
expandAtFiles
(boolean expandAtFiles) (package private) void
initFrom
(CommandLine.Model.ParserSpec settings) (package private) void
initSeparator
(String value) boolean
Returns true if arguments should be split first before any further processing and the number of parts resulting from the split is limited to the max arity of the argument.limitSplit
(boolean limitSplit) Sets whether arguments should be split first before any further processing.boolean
overwrittenOptionsAllowed
(boolean overwrittenOptionsAllowed) boolean
posixClusteredShortOptionsAllowed
(boolean posixClusteredShortOptionsAllowed) Returns the String to use as the separator between options and option parameters.Sets the String to use as the separator between options and option parameters.private boolean
private boolean
boolean
splitQuotedStrings
(boolean splitQuotedStrings) boolean
stopAtPositional
(boolean stopAtPositional) boolean
stopAtUnmatched
(boolean stopAtUnmatched) boolean
toggleBooleanFlags
(boolean toggleBooleanFlags) toString()
boolean
trimQuotes
(boolean trimQuotes) boolean
unmatchedArgumentsAllowed
(boolean unmatchedArgumentsAllowed) boolean
unmatchedOptionsAllowedAsOptionParameters
(boolean unmatchedOptionsAllowedAsOptionParameters) boolean
unmatchedOptionsArePositionalParams
(boolean unmatchedOptionsArePositionalParams) (package private) void
updateSeparator
(String value) boolean
useSimplifiedAtFiles
(boolean useSimplifiedAtFiles)
-
Field Details
-
DEFAULT_SEPARATOR
Constant String holding the default separator between options and option parameters:"="
.- See Also:
-
DEFAULT_END_OF_OPTIONS_DELIMITER
- See Also:
-
abbreviatedOptionsAllowed
private boolean abbreviatedOptionsAllowed -
abbreviatedSubcommandsAllowed
private boolean abbreviatedSubcommandsAllowed -
allowOptionsAsOptionParameters
private boolean allowOptionsAsOptionParameters -
allowSubcommandsAsOptionParameters
private boolean allowSubcommandsAsOptionParameters -
aritySatisfiedByAttachedOptionParam
private boolean aritySatisfiedByAttachedOptionParam -
atFileCommentChar
-
caseInsensitiveEnumValuesAllowed
private boolean caseInsensitiveEnumValuesAllowed -
collectErrors
private boolean collectErrors -
endOfOptionsDelimiter
-
expandAtFiles
private boolean expandAtFiles -
limitSplit
private boolean limitSplit -
overwrittenOptionsAllowed
private boolean overwrittenOptionsAllowed -
posixClusteredShortOptionsAllowed
private boolean posixClusteredShortOptionsAllowed -
separator
-
splitQuotedStrings
private boolean splitQuotedStrings -
stopAtPositional
private boolean stopAtPositional -
stopAtUnmatched
private boolean stopAtUnmatched -
toggleBooleanFlags
private boolean toggleBooleanFlags -
trimQuotes
private boolean trimQuotes -
unmatchedArgumentsAllowed
private boolean unmatchedArgumentsAllowed -
unmatchedOptionsAllowedAsOptionParameters
private boolean unmatchedOptionsAllowedAsOptionParameters -
unmatchedOptionsArePositionalParams
private boolean unmatchedOptionsArePositionalParams -
useSimplifiedAtFiles
private boolean useSimplifiedAtFiles
-
-
Constructor Details
-
ParserSpec
public ParserSpec()
-
-
Method Details
-
separator
Returns the String to use as the separator between options and option parameters."="
by default, initialized fromCommandLine.Command.separator()
if defined. -
stopAtUnmatched
public boolean stopAtUnmatched()- See Also:
-
stopAtPositional
public boolean stopAtPositional()- See Also:
-
endOfOptionsDelimiter
- Since:
- 3.5
- See Also:
-
toggleBooleanFlags
public boolean toggleBooleanFlags()- See Also:
-
overwrittenOptionsAllowed
public boolean overwrittenOptionsAllowed()- See Also:
-
unmatchedArgumentsAllowed
public boolean unmatchedArgumentsAllowed()- See Also:
-
abbreviatedSubcommandsAllowed
public boolean abbreviatedSubcommandsAllowed()- See Also:
-
abbreviatedOptionsAllowed
public boolean abbreviatedOptionsAllowed()- See Also:
-
expandAtFiles
public boolean expandAtFiles()- See Also:
-
atFileCommentChar
- Since:
- 3.5
- See Also:
-
useSimplifiedAtFiles
public boolean useSimplifiedAtFiles()- Since:
- 3.9
- See Also:
-
posixClusteredShortOptionsAllowed
public boolean posixClusteredShortOptionsAllowed()- See Also:
-
caseInsensitiveEnumValuesAllowed
public boolean caseInsensitiveEnumValuesAllowed()- Since:
- 3.4
- See Also:
-
trimQuotes
public boolean trimQuotes()- Since:
- 3.7
- See Also:
-
splitQuotedStrings
public boolean splitQuotedStrings()- Since:
- 3.7
- See Also:
-
unmatchedOptionsArePositionalParams
public boolean unmatchedOptionsArePositionalParams()- See Also:
-
unmatchedOptionsAllowedAsOptionParameters
public boolean unmatchedOptionsAllowedAsOptionParameters()- Since:
- 4.4
- See Also:
-
allowSubcommandsAsOptionParameters
public boolean allowSubcommandsAsOptionParameters()- Since:
- 4.7.6
- See Also:
-
allowOptionsAsOptionParameters
public boolean allowOptionsAsOptionParameters()- Since:
- 4.7.6
- See Also:
-
splitFirst
private boolean splitFirst() -
limitSplit
public boolean limitSplit()Returns true if arguments should be split first before any further processing and the number of parts resulting from the split is limited to the max arity of the argument. -
aritySatisfiedByAttachedOptionParam
public boolean aritySatisfiedByAttachedOptionParam()Returns true if options with attached arguments should not consume subsequent arguments and should not validate arity. The default isfalse
. -
collectErrors
public boolean collectErrors()Returns true if exceptions during parsing should be collected instead of thrown. Multiple errors may be encountered during parsing. These can be obtained fromCommandLine.ParseResult.errors()
.- Since:
- 3.2
-
separator
Sets the String to use as the separator between options and option parameters.- Returns:
- this ParserSpec for method chaining
-
stopAtUnmatched
- See Also:
-
stopAtPositional
- See Also:
-
endOfOptionsDelimiter
- Since:
- 3.5
- See Also:
-
toggleBooleanFlags
- See Also:
-
overwrittenOptionsAllowed
- See Also:
-
unmatchedArgumentsAllowed
- See Also:
-
abbreviatedSubcommandsAllowed
public CommandLine.Model.ParserSpec abbreviatedSubcommandsAllowed(boolean abbreviatedSubcommandsAllowed) - See Also:
-
abbreviatedOptionsAllowed
- See Also:
-
expandAtFiles
- See Also:
-
atFileCommentChar
- Since:
- 3.5
- See Also:
-
useSimplifiedAtFiles
- Since:
- 3.9
- See Also:
-
posixClusteredShortOptionsAllowed
public CommandLine.Model.ParserSpec posixClusteredShortOptionsAllowed(boolean posixClusteredShortOptionsAllowed) - See Also:
-
caseInsensitiveEnumValuesAllowed
public CommandLine.Model.ParserSpec caseInsensitiveEnumValuesAllowed(boolean caseInsensitiveEnumValuesAllowed) - Since:
- 3.4
- See Also:
-
trimQuotes
- Since:
- 3.7
- See Also:
-
splitQuotedStrings
- Since:
- 3.7
- See Also:
-
unmatchedOptionsAllowedAsOptionParameters
public CommandLine.Model.ParserSpec unmatchedOptionsAllowedAsOptionParameters(boolean unmatchedOptionsAllowedAsOptionParameters) - Since:
- 4.4
- See Also:
-
unmatchedOptionsArePositionalParams
public CommandLine.Model.ParserSpec unmatchedOptionsArePositionalParams(boolean unmatchedOptionsArePositionalParams) - See Also:
-
allowSubcommandsAsOptionParameters
public CommandLine.Model.ParserSpec allowSubcommandsAsOptionParameters(boolean allowSubcommandsAsOptionParameters) - Since:
- 4.7.6
- See Also:
-
allowOptionsAsOptionParameters
public CommandLine.Model.ParserSpec allowOptionsAsOptionParameters(boolean allowOptionsAsOptionParameters) - Since:
- 4.7.6
- See Also:
-
collectErrors
Sets whether exceptions during parsing should be collected instead of thrown. Multiple errors may be encountered during parsing. These can be obtained fromCommandLine.ParseResult.errors()
.- Since:
- 3.2
-
aritySatisfiedByAttachedOptionParam
Returns true if options with attached arguments should not consume subsequent arguments and should not validate arity. The default isfalse
. -
limitSplit
Sets whether arguments should be split first before any further processing. If true, the original argument will only be split into as many parts as allowed by max arity. -
shouldTrimQuotes
private boolean shouldTrimQuotes() -
initSeparator
-
updateSeparator
-
toString
-
initFrom
-