Package org.apache.commons.cli
Class AmbiguousOptionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.commons.cli.ParseException
org.apache.commons.cli.UnrecognizedOptionException
org.apache.commons.cli.AmbiguousOptionException
- All Implemented Interfaces:
Serializable
Exception thrown when an option can't be identified from a partial name.
- Since:
- 1.3
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Collection<String>
The list of options matching the partial name specifiedprivate static final long
This exceptionserialVersionUID
. -
Constructor Summary
ConstructorsConstructorDescriptionAmbiguousOptionException
(String option, Collection<String> matchingOptions) Constructs a new AmbiguousOptionException. -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
createMessage
(String option, Collection<String> matchingOptions) Build the exception message from the specified list of options.Gets the options matching the partial name.Methods inherited from class org.apache.commons.cli.UnrecognizedOptionException
getOption
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDThis exceptionserialVersionUID
.- See Also:
-
matchingOptions
The list of options matching the partial name specified
-
-
Constructor Details
-
AmbiguousOptionException
Constructs a new AmbiguousOptionException.- Parameters:
option
- the partial option namematchingOptions
- the options matching the name
-
-
Method Details
-
createMessage
Build the exception message from the specified list of options.- Parameters:
option
-matchingOptions
-- Returns:
-
getMatchingOptions
Gets the options matching the partial name.- Returns:
- a collection of options matching the name
-