Class IncompatibleTypeException

All Implemented Interfaces:
Serializable

public class IncompatibleTypeException extends RiceRuntimeException
An exception which indicates that the type of data being evaluated in the engine does not match the expected type.
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Constructor Details

    • IncompatibleTypeException

      public 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.

      A message describing the nature of the incompatible types will automatically be generated and can be retrieved through Throwable.getMessage()

      Parameters:
      value - the object which was being evaluated against a set of valid types
      validTypes - the valid types against which the value was being evaluated but failed to be compatible with
    • IncompatibleTypeException

      public IncompatibleTypeException(Exception ex, Object value, Class<?>... validTypes)
    • IncompatibleTypeException

      public 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.

      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().

      Parameters:
      additionalMessage - the additional message to prepend to the generated exception detail message
      value - the object which was being evaluated against a set of valid types
      validTypes - the valid types against which the value was being evaluated but failed to be compatible with
    • IncompatibleTypeException

      public IncompatibleTypeException(Exception ex, String additionalMessage, Object value, Class<?>... validTypes)
  • Method Details

    • getValue

      public Object getValue()
      Returns the object which triggered the incompatible type exception.
      Returns:
      the value passed to this exception upon construction
    • getValidTypes

      public Class<?>[] getValidTypes()
      Returns the array of Class objects which include the types against which the object value was deemed incompatible.
      Returns:
      the valid types passed to this exception upon construction