Package snaq.util.jclap
Class OptionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
snaq.util.jclap.OptionException
- All Implemented Interfaces:
Serializable
public final class OptionException extends Exception
Exception for command-line option parsing problems.
- Author:
- Giles Winstanley
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOptionException.TypeDefines the types ofOptionExceptionthat exist. -
Field Summary
Fields Modifier and Type Field Description protected static ResourceBundleBUNDLEResources for internationalization.protected static LocaleLOCALELocalefor help/error display. -
Constructor Summary
Constructors Constructor Description OptionException(OptionException.Type type, String optionName)Creates a newOptionExceptioninstance.OptionException(OptionException.Type type, String optionName, char flag)Creates a newOptionExceptioninstance.OptionException(OptionException.Type type, String optionName, String optionValue)Creates a newOptionExceptioninstance.OptionException(OptionException.Type type, Option option)Creates a newOptionExceptioninstance.OptionException(OptionException.Type type, Option option, String optionValue)Creates a newOptionExceptioninstance. -
Method Summary
Modifier and Type Method Description StringgetLocalizedMessage()StringgetMessage()OptionException.TypegetType()Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
Constructor Details
-
OptionException
Creates a newOptionExceptioninstance.- Parameters:
type- type ofOptionExceptionto create (i.e. reason)option-Optioninstance for which this exception is being createdoptionValue- value of the option for which this exception is being created
-
OptionException
Creates a newOptionExceptioninstance.- Parameters:
type- type ofOptionExceptionto create (i.e. reason)optionName- name of the option for which this exception is being createdoptionValue- value of the option for which this exception is being created
-
OptionException
Creates a newOptionExceptioninstance.- Parameters:
type- type ofOptionExceptionto create (i.e. reason)optionName- name of the option for which this exception is being createdflag- flag character for which this exception is being created
-
OptionException
Creates a newOptionExceptioninstance.- Parameters:
type- type ofOptionExceptionto create (i.e. reason)option-Optioninstance for which this exception is being created
-
OptionException
Creates a newOptionExceptioninstance.- Parameters:
type- type ofOptionExceptionto create (i.e. reason)optionName- name of the option for which this exception is being created
-
-
Method Details
-
getType
- Returns:
- exception type
-
getMessage
- Overrides:
getMessagein classThrowable
-
getLocalizedMessage
- Overrides:
getLocalizedMessagein classThrowable
-