Class NotWritablePropertyException

All Implemented Interfaces:
Serializable

public class NotWritablePropertyException extends InvalidPropertyException
Exception thrown on an attempt to set the value of a property that is not writable (typically because there is no setter method).
Author:
Rod Johnson, Alef Arendsen, Arjen Poutsma
See Also:
  • Constructor Details

    • NotWritablePropertyException

      public NotWritablePropertyException(Class<?> beanClass, String propertyName)
      Create a new NotWritablePropertyException.
      Parameters:
      beanClass - the offending bean class
      propertyName - the offending property name
    • NotWritablePropertyException

      public NotWritablePropertyException(Class<?> beanClass, String propertyName, String msg)
      Create a new NotWritablePropertyException.
      Parameters:
      beanClass - the offending bean class
      propertyName - the offending property name
      msg - the detail message
    • NotWritablePropertyException

      public NotWritablePropertyException(Class<?> beanClass, String propertyName, String msg, Throwable cause)
      Create a new NotWritablePropertyException.
      Parameters:
      beanClass - the offending bean class
      propertyName - the offending property name
      msg - the detail message
      cause - the root cause
    • NotWritablePropertyException

      public NotWritablePropertyException(Class<?> beanClass, String propertyName, String msg, String[] possibleMatches)
      Create a new NotWritablePropertyException.
      Parameters:
      beanClass - the offending bean class
      propertyName - the offending property name
      msg - the detail message
      possibleMatches - suggestions for actual bean property names that closely match the invalid property name
  • Method Details

    • getPossibleMatches

      @Nullable public String[] getPossibleMatches()
      Return suggestions for actual bean property names that closely match the invalid property name, if any.