| STATE_CHANGE |
= |
pointcut :writing => :state |
|
Two alternative versions of the following pointcut would be STATE_CHANGE =
pointcut :method => :state= STATE_CHANGE = pointcut :attribute =>
:state, :attribute_options => [:writers] Note that only matching on the
attribute writers is important, especially given the advice block below,
because if the reader is allowed to be advised, we get an infinite
recursion of advice invocation! The correct solution is the planned
extension of the pointcut language to support condition tests for context.
I.e., we don‘t want the advice applied when it‘s already inside
advice.
|
| STATE_CHANGE |
= |
pointcut :writing => :state |
|
Two alternative versions of the following pointcut would be STATE_CHANGE =
pointcut :method => :state= STATE_CHANGE = pointcut :attribute =>
:state, :attribute_options => [:writers] Note that only matching on the
attribute writers is important, especially given the advice block below,
because if the reader is allowed to be advised, we get an infinite
recursion of advice invocation! The correct solution is the planned
extension of the pointcut language to support condition tests for context.
I.e., we don‘t want the advice applied when it‘s already inside
advice.
|