Package: groovy.lang

## [Java] Class IllegalPropertyAccessException

- groovy.lang.IllegalPropertyAccessException

-     public class IllegalPropertyAccessException
      extends MissingPropertyException

  An exception occurred if a dynamic property dispatch fails with a field not accessible.

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

  - ### Constructor Summary

    Constructors
    Constructor and description
    `IllegalPropertyAccessException(String propertyName, Class clazz, int modifiers)` Creates an exception for an inaccessible property.
    `IllegalPropertyAccessException(Field field, Class clazz)` Creates an exception for an inaccessible field-backed property.

  - ### 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 IllegalPropertyAccessException(String propertyName, Class clazz, int modifiers)

      Creates an exception for an inaccessible property.

      Parameters:
        `propertyName` - the property name
        `clazz` - the declaring class
        `modifiers` - the member modifiers

    - #### public IllegalPropertyAccessException(Field field, Class clazz)

      Creates an exception for an inaccessible field-backed property.

      Parameters:
        `field` - the inaccessible field
        `clazz` - the declaring class