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

## groovy.lang
Interface PropertyAccessInterceptor

    groovy.lang.Interceptor
      groovy.lang.PropertyAccessInterceptor

All Superinterfaces:
  Interceptor

    interface PropertyAccessInterceptor
    extends Interceptor

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

author:
  Graeme Rocher

since:
  Oct 24, 2005

Method Summary
`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

Methods inherited from interface Interceptor
afterInvoke, beforeInvoke, doInvoke

Method Detail

### beforeGet

    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
  param:
    object The target object
  param:
    property The property to get
  return:
    A value supplied by the interceptor

### beforeSet

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

  Intercepts a setXXX call
  param:
    object The target object
  param:
    property The property to set
  param:
    newValue The new value

Copyright © 2003-2009 The Codehaus. All rights reserved.