Class AlreadySelectedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.aspectran.shell.command.option.OptionParserException
com.aspectran.shell.command.option.AlreadySelectedException
- All Implemented Interfaces:
Serializable
Thrown when more than one option in an option group
has been provided.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAlreadySelectedException
(OptionGroup group, Option option) Construct a newAlreadySelectedException
for the specified option group.AlreadySelectedException
(String message) Construct a newAlreadySelectedException
with the specified detail message. -
Method Summary
Modifier and TypeMethodDescriptionReturns the option that was added to the group and triggered the exception.Returns the option group where another option has been selected.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AlreadySelectedException
Construct a newAlreadySelectedException
with the specified detail message.- Parameters:
message
- the detail message
-
AlreadySelectedException
Construct a newAlreadySelectedException
for the specified option group.- Parameters:
group
- the option group already selectedoption
- the option that triggered the exception
-
-
Method Details
-
getOptionGroup
Returns the option group where another option has been selected.- Returns:
- the related option group
-
getOption
Returns the option that was added to the group and triggered the exception.- Returns:
- the related option
-