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:
java.io.Serializable
public class AmbiguousOptionException extends UnrecognizedOptionException
Exception thrown when an option can't be identified from a partial name.- Since:
- 1.3
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<java.lang.String>
matchingOptions
The list of options matching the partial name specifiedprivate static long
serialVersionUID
This exceptionserialVersionUID
.
-
Constructor Summary
Constructors Constructor Description AmbiguousOptionException(java.lang.String option, java.util.Collection<java.lang.String> matchingOptions)
Constructs a new AmbiguousOptionException.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
createMessage(java.lang.String option, java.util.Collection<java.lang.String> matchingOptions)
Build the exception message from the specified list of options.java.util.Collection<java.lang.String>
getMatchingOptions()
Gets the options matching the partial name.-
Methods inherited from class org.apache.commons.cli.UnrecognizedOptionException
getOption
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
This exceptionserialVersionUID
.- See Also:
- Constant Field Values
-
matchingOptions
private final java.util.Collection<java.lang.String> matchingOptions
The list of options matching the partial name specified
-
-
Method Detail
-
createMessage
private static java.lang.String createMessage(java.lang.String option, java.util.Collection<java.lang.String> matchingOptions)
Build the exception message from the specified list of options.- Parameters:
option
-matchingOptions
-- Returns:
-
getMatchingOptions
public java.util.Collection<java.lang.String> getMatchingOptions()
Gets the options matching the partial name.- Returns:
- a collection of options matching the name
-
-