public class IncompatibleTypeException extends RiceRuntimeException
| Constructor and Description |
|---|
IncompatibleTypeException(Object value,
Class<?>... validTypes)
Constructs an IncompatibleTypeException with a reference to the object
being checked and an array of valid Class objects which the type failed
to match.
|
IncompatibleTypeException(String additionalMessage,
Object value,
Class<?>... validTypes)
Constructs an IncompatibleTypeException with a message, a reference to the object
being checked, and an array of valid Class objects which the type failed
to match.
|
| Modifier and Type | Method and Description |
|---|---|
Class<?>[] |
getValidTypes()
Returns the array of Class objects which include the types against
which the object value was deemed incompatible.
|
Object |
getValue()
Returns the object which triggered the incompatible type exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic IncompatibleTypeException(Object value, Class<?>... validTypes)
A message describing the nature of the incompatible types will
automatically be generated and can be retrieved through Throwable.getMessage()
value - the object which was being evaluated against a set of valid typesvalidTypes - the valid types against which the value was being evaluated
but failed to be compatible withpublic IncompatibleTypeException(String additionalMessage, Object value, Class<?>... validTypes)
The additional message will be prepended to the front of an automatically
generated message describing the nature of the incompatible types and can be
retrieved through Throwable.getMessage().
additionalMessage - the additional message to prepend to the generated exception detail messagevalue - the object which was being evaluated against a set of valid typesvalidTypes - the valid types against which the value was being evaluated
but failed to be compatible withpublic Object getValue()
public Class<?>[] getValidTypes()
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.