Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] bsh assignment not trigger set pointcut

"Gregor Kiczales" <gregor@xxxxxxxxx> writes:

> Is the problem here that the code that beanshell generates and compiles
> isn't passed through ajc, so that join points in that code aren't
> available to advice?

Certainly, the assignment statement I typed into BeanShell was not
passed through ajc.  Maybe that explains it.  I don't know what
assignment means in terms of Java bytecode.  And how AspectJ would
relate to it.

>> I was fiddling around recently and found that making an 
>> assignment in the Beanshell did not match a set pointcut.
>> 
>> 	pointcut writeField() : set(* trans.ModelObject+.*) 
>> 		&& !set(* trans.ModelObject+.deps);
>> 
>> However, if I did the same assignment inside a 
>> trans.ModelObject+ method, the join point was hit.  That 
>> doesn't seem right.  Comments? Maybe Beanshell is reaching 
>> around the mechanism that AspectJ is trapping?

-- 
John M. Adams



Back to the top