|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.sf.qualitycheck.exception.IllegalInstanceOfArgumentException
public class IllegalInstanceOfArgumentException
Thrown to indicate that a method has been passed with a reference of an unexpected type.
| Field Summary | |
|---|---|
protected static String |
DEFAULT_MESSAGE
Default message to indicate that a given argument must is a member of an unexpected type |
protected static String |
MESSAGE_WITH_NAME_AND_TYPES
Message to indicate that a given argument with name must is a member of an unexpected type (with current and expected type information) |
protected static String |
MESSAGE_WITH_TYPES
Message to indicate that a given argument with must is a member of an unexpected type (with current and expected type information) |
protected static String |
NO_TYPE_PLACEHOLDER
Placeholder for not set types to format a message human readable |
| Constructor Summary | |
|---|---|
IllegalInstanceOfArgumentException()
Constructs an IllegalInstanceOfArgumentException with the default message
DEFAULT_MESSAGE. |
|
IllegalInstanceOfArgumentException(String argumentName,
Class<?> expectedType,
Class<?> actualType)
Constructs an IllegalInstanceOfArgumentException with the message
MESSAGE_WITH_NAME_AND_TYPES including the given name of the argument
as string representation. |
|
IllegalInstanceOfArgumentException(Throwable cause)
Constructs a new exception with the default message DEFAULT_MESSAGE. |
|
| Method Summary |
|---|
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final String DEFAULT_MESSAGE
protected static final String MESSAGE_WITH_TYPES
protected static final String MESSAGE_WITH_NAME_AND_TYPES
protected static final String NO_TYPE_PLACEHOLDER
| Constructor Detail |
|---|
public IllegalInstanceOfArgumentException()
IllegalInstanceOfArgumentException with the default message
DEFAULT_MESSAGE.
public IllegalInstanceOfArgumentException(@Nullable
String argumentName,
@Nullable
Class<?> expectedType,
@Nullable
Class<?> actualType)
IllegalInstanceOfArgumentException with the message
MESSAGE_WITH_NAME_AND_TYPES including the given name of the argument
as string representation.
argumentName - the name of the passed argumentexpectedType - the expected class of the given argumentactualType - the actual class of the given argument
public IllegalInstanceOfArgumentException(@Nullable
Throwable cause)
DEFAULT_MESSAGE.
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A
null value is permitted, and indicates that the cause is nonexistent or unknown.)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||