APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.joptsimple

public abstract Class OptionException

extends RuntimeException
Class Inheritance
Known Direct Subclasses
jdk.internal.joptsimple.OptionMissingRequiredArgumentException, jdk.internal.joptsimple.UnavailableOptionException, jdk.internal.joptsimple.UnconfiguredOptionException, jdk.internal.joptsimple.UnrecognizedOptionException, jdk.internal.joptsimple.OptionArgumentConversionException, jdk.internal.joptsimple.IllegalOptionSpecificationException, jdk.internal.joptsimple.MissingRequiredOptionsException, jdk.internal.joptsimple.MultipleArgumentsForOptionException
Imports
java.util.ArrayList, .Collection, .Iterator, .LinkedHashSet, .List, .Locale, .Set, jdk.internal.joptsimple.internal.Strings

Thrown when a problem occurs during option parsing.
Author
Paul Holser

Field Summary

Modifier and TypeField and Description
private final List<String>
private static final long

Constructor Summary

AccessConstructor and Description
protected
protected
OptionException(Collection<? extends OptionSpec<?>> options)

protected
OptionException(Collection<? extends OptionSpec<?>> options, Throwable cause)

Method Summary

Modifier and TypeMethod and Description
private String
public final String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

pack-priv final String
pack-priv abstract Object[]
protected final String
public List<String>

Returns:

the option being considered when the exception was created
options
()

Gives the option being considered when the exception was created.

protected final String
protected final String
private List<String>
specsToStrings(Collection<? extends OptionSpec<?>> options)

private String
pack-priv static OptionException

Field Detail

optionsback to summary
private final List<String> options
Annotations
@SuppressWarnings:serial
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Constructor Detail

OptionExceptionback to summary
protected OptionException(List<String> options)
OptionExceptionback to summary
protected OptionException(Collection<? extends OptionSpec<?>> options)
OptionExceptionback to summary
protected OptionException(Collection<? extends OptionSpec<?>> options, Throwable cause)

Method Detail

formattedMessageback to summary
private String formattedMessage(Locale locale)
getMessageback to summary
public final String getMessage()

Overrides java.lang.Throwable.getMessage.

Doc from java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Annotations
@Override
localizedMessageback to summary
pack-priv final String localizedMessage(Locale locale)
messageArgumentsback to summary
pack-priv abstract Object[] messageArguments()
multipleOptionStringback to summary
protected final String multipleOptionString()
optionsback to summary
public List<String> options()

Gives the option being considered when the exception was created.

Returns:List<String>

the option being considered when the exception was created

singleOptionStringback to summary
protected final String singleOptionString()
singleOptionStringback to summary
protected final String singleOptionString(String option)
specsToStringsback to summary
private List<String> specsToStrings(Collection<? extends OptionSpec<?>> options)
specToStringback to summary
private String specToString(OptionSpec<?> option)
unrecognizedOptionback to summary
pack-priv static OptionException unrecognizedOption(String option)