org.codehaus.groovy.grails.commons.metaclass
Interface PropertyAccessInterceptor

All Superinterfaces:
Interceptor
All Known Implementing Classes:
AbstractDynamicMethodsInterceptor, GroovyDynamicMethodsInterceptor

public interface PropertyAccessInterceptor
extends Interceptor

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

Since:
Oct 24, 2005
Author:
Graeme Rocher

Method Summary
 Object beforeGet(Object object, String property, InvocationCallback callback)
          Intercepts a getXXX call and returns a result.
 void beforeSet(Object object, String property, Object newValue, InvocationCallback callback)
          Intercepts a setXXX call
 
Methods inherited from interface org.codehaus.groovy.grails.commons.metaclass.Interceptor
afterInvoke, beforeInvoke
 

Method Detail

beforeGet

Object beforeGet(Object object,
                 String property,
                 InvocationCallback callback)
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
callback - The callback object
Returns:
A value supplied by the interceptor

beforeSet

void beforeSet(Object object,
               String property,
               Object newValue,
               InvocationCallback callback)
Intercepts a setXXX call

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


Copyright (c) 2005-2009 The Grails project