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 booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate Characterprivate booleanprivate boolean(package private) static final String(package private) static final StringConstant String holding the default separator between options and option parameters:"=".private Stringprivate booleanprivate booleanprivate booleanprivate booleanprivate Stringprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate boolean -
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) (package private) voidinitFrom(CommandLine.Model.ParserSpec settings) (package private) voidinitSeparator(String value) 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.private booleanprivate booleanbooleansplitQuotedStrings(boolean splitQuotedStrings) booleanstopAtPositional(boolean stopAtPositional) booleanstopAtUnmatched(boolean stopAtUnmatched) booleantoggleBooleanFlags(boolean toggleBooleanFlags) toString()booleantrimQuotes(boolean trimQuotes) booleanunmatchedArgumentsAllowed(boolean unmatchedArgumentsAllowed) booleanunmatchedOptionsAllowedAsOptionParameters(boolean unmatchedOptionsAllowedAsOptionParameters) booleanunmatchedOptionsArePositionalParams(boolean unmatchedOptionsArePositionalParams) (package private) voidupdateSeparator(String value) booleanuseSimplifiedAtFiles(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
-