Package: groovy.lang

## [Java] Class ReadOnlyPropertyException

- groovy.lang.ReadOnlyPropertyException

-     public class ReadOnlyPropertyException
      extends MissingPropertyException

  This exception is thrown if an attempt is made to set a read-only property.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class MissingPropertyException` | `MPE`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `ReadOnlyPropertyException(String property, Class type)` Creates an exception for a read-only property on the supplied type.
    `ReadOnlyPropertyException(String property, String classname)` Creates an exception for a read-only property on the supplied class name.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class MissingPropertyException` | `getMessageWithoutLocationText, getProperty, getType`
    `class GroovyRuntimeException` | `getLocationText, getMessage, getMessageWithoutLocationText, getModule, getNode, setModule`

- - ### Constructor Detail

    - #### public ReadOnlyPropertyException(String property, Class type)

      Creates an exception for a read-only property on the supplied type.

      Parameters:
        `property` - the property name
        `type` - the target type

    - #### public ReadOnlyPropertyException(String property, String classname)

      Creates an exception for a read-only property on the supplied class name.

      Parameters:
        `property` - the property name
        `classname` - the target class name