@Status(stage=DEVELOPMENT, unitTests=ABSENT) @Review(by="Kees Schotanus", at="2009-09-28") public class InvalidStateException extends InvalidArgumentException
ValueObject
is in an invalid state.
IllegalStateException
but this exception is both checked and localizable.Constructor and Description |
---|
InvalidStateException()
Default constructor creates an InvalidStateException with a standard, non localized message.
|
InvalidStateException(AbstractLocalizedException exception)
Constructs an InvalidStateException from the supplied exception.
|
InvalidStateException(String message)
Constructs an InvalidStateException using the supplied message.
|
InvalidStateException(String resourceBundleName,
String messageKey,
Object... messageArguments)
Constructs an InvalidStateException from the supplied
ResourceBundle
name and the supplied message key and optional arguments. |
InvalidStateException(Throwable cause,
String message)
Constructs an InvalidStateException using the supplied cause and message.
|
InvalidStateException(Throwable cause,
String resourceBundleName,
String messageKey,
Object... messageArguments)
Constructs an InvalidStateException from the supplied
ResourceBundle name, the supplied message key,
optional arguments and optional cause. |
getDescription, getMessage, getMessage, getMessageArguments, getMessageKey, getResourceBundleName, toString
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public InvalidStateException()
public InvalidStateException(String message)
message
- Message with additional information about why the object is in an invalid state.public InvalidStateException(AbstractLocalizedException exception)
exception
- The exception to create this InvalidStateException from.NullPointerException
- When the supplied exception contains a null resource bundle name or a null message key.public InvalidStateException(Throwable cause, String message)
cause
- Exception that caused this exception.
message
- Message indicating why the exception occurred.public InvalidStateException(String resourceBundleName, String messageKey, Object... messageArguments)
ResourceBundle
name and the supplied message key and optional arguments.
resourceBundleName
- The name of the ResourceBundle
that contains the localized messages.messageKey
- Key to the resource bundle to retrieve the localized message.messageArguments
- The message arguments that will be inserted into the localized message.IllegalArgumentException
- When the supplied resourceBundleName or messageKey is empty.NullPointerException
- When the supplied resourceBundleName or messageKey is null.public InvalidStateException(Throwable cause, String resourceBundleName, String messageKey, Object... messageArguments)
ResourceBundle
name, the supplied message key,
optional arguments and optional cause.
cause
- Exception that caused this exception.
resourceBundleName
- The name of the ResourceBundle
that contains the localized messages.messageKey
- Key to the resource bundle to retrieve the localized message.messageArguments
- The message arguments that will be inserted into the localized message.IllegalArgumentException
- When the supplied resourceBundleName or messageKey is empty.NullPointerException
- When the supplied resourceBundleName or messageKey is null.Copyright © 2008–2018. All rights reserved.