Package picocli
Class CommandLine.Model.ParserSpec
java.lang.Object
picocli.CommandLine.Model.ParserSpec
- Enclosing class:
CommandLine.Model
Models parser configuration specification.
- Since:
- 3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanabbreviatedOptionsAllowed(boolean abbreviatedOptionsAllowed) booleanabbreviatedSubcommandsAllowed(boolean abbreviatedSubcommandsAllowed) booleanallowOptionsAsOptionParameters(boolean allowOptionsAsOptionParameters) booleanallowSubcommandsAsOptionParameters(boolean allowSubcommandsAsOptionParameters) booleanReturns 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) booleancaseInsensitiveEnumValuesAllowed(boolean caseInsensitiveEnumValuesAllowed) booleanReturns 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) booleanexpandAtFiles(boolean expandAtFiles) booleanReturns 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.booleanoverwrittenOptionsAllowed(boolean overwrittenOptionsAllowed) booleanposixClusteredShortOptionsAllowed(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.booleansplitQuotedStrings(boolean splitQuotedStrings) booleanstopAtPositional(boolean stopAtPositional) booleanstopAtUnmatched(boolean stopAtUnmatched) booleantoggleBooleanFlags(boolean toggleBooleanFlags) toString()booleantrimQuotes(boolean trimQuotes) booleanunmatchedArgumentsAllowed(boolean unmatchedArgumentsAllowed) booleanunmatchedOptionsAllowedAsOptionParameters(boolean unmatchedOptionsAllowedAsOptionParameters) booleanunmatchedOptionsArePositionalParams(boolean unmatchedOptionsArePositionalParams) booleanuseSimplifiedAtFiles(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.5
- See Also:
-
allowOptionsAsOptionParameters
public boolean allowOptionsAsOptionParameters()- Since:
- 4.7.5
- See Also:
-
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.5
- See Also:
-
allowOptionsAsOptionParameters
public CommandLine.Model.ParserSpec allowOptionsAsOptionParameters(boolean allowOptionsAsOptionParameters) - Since:
- 4.7.5
- 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. -
toString
-