Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## groovy.lang
[Java] Interface PropertyAccessInterceptor

    groovy.lang.PropertyAccessInterceptor
      groovy.lang.Interceptor

All Superinterfaces:
  Interceptor

    public interface PropertyAccessInterceptor
    extends Interceptor

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

Authors:
  Graeme Rocher

Since:
  Oct 24, 2005

Method Summary
`java.lang.Object` | `beforeGet(java.lang.Object object, java.lang.String property)` Intercepts a getXXX call and returns a result.
`void` | `beforeSet(java.lang.Object object, java.lang.String property, java.lang.Object newValue)` Intercepts a setXXX call

Methods inherited from interface Interceptor
afterInvoke, beforeInvoke, doInvoke

Method Detail

### beforeGet

    public java.lang.Object beforeGet(java.lang.Object object, java.lang.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

### beforeSet

    public void beforeSet(java.lang.Object object, java.lang.String property, java.lang.Object newValue)

  Intercepts a setXXX call
  Parameters:
    `object` - The target object
    `property` - The property to set
    `newValue` - The new value

Groovy Documentation