PropertyAccessInterceptor (groovy 2.4.6 API)
Date: 2016-02-18

Package: groovy.lang

## [Java] Interface PropertyAccessInterceptor

- groovy.lang.Interceptor

- All Superinterfaces:
    Interceptor

  An interface that adds the ability to intercept property getters/setters

  Authors:
    Graeme Rocher
  Since:
    Oct 24, 2005

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `Object` | `beforeGet(Object object, String property)` Intercepts a getXXX call and returns a result.
    `void` | `beforeSet(Object object, String property, Object newValue)` Intercepts a setXXX call

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface Interceptor` | `afterInvoke, beforeInvoke, doInvoke`

- - ### Method Detail

    - #### public Object beforeGet(Object object, String property)

      Intercepts a getXXX call and returns a result. The result is replaced by the real value if doGet() return false

      Parameters:
        `object` - The target object
        `property` - The property to get
      Returns:
        A value supplied by the interceptor

    - #### public void beforeSet(Object object, String property, Object newValue)

      Intercepts a setXXX call

      Parameters:
        `object` - The target object
        `property` - The property to set
        `newValue` - The new value