Top Description Methods
groovy.lang

public Interface PropertyAccessInterceptor

extends Interceptor

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

Since
Oct 24, 2005

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

A value supplied by the interceptor
beforeGet
(Object
The target object
object
,
String
The property to get
property
)

Intercepts a getXXX call and returns a result.

public void
beforeSet(Object
The target object
object
,
String
The property to set
property
,
Object
The new value
newValue
)

Intercepts a setXXX call

Inherited from groovy.lang.Interceptor:
afterInvokebeforeInvokedoInvoke

Method Detail

beforeGetback to summary
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:Object

The target object

property:String

The property to get

Returns:Object

A value supplied by the interceptor

beforeSetback to summary
public void beforeSet(Object object, String property, Object newValue)

Intercepts a setXXX call

Parameters
object:Object

The target object

property:String

The property to set

newValue:Object

The new value