Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Reflection pointcut

Hi,
I have an aspect that I use to check (and change) the return value of some get method.
So I have a pointcut like that:

public pointcut domainObjectGetters() : call(java.util.Collection*+ PersistentObject+.get*());

and

Object around() : domainObjectGetters() {
	// some stuff
}

This works well, but sometimes those collections of PersistentObject are called by reflection (java.lang.reflect.Fields.get()), so the advice is not called.
How can I do that?
I tried with:

public pointcut reflectionGetters() : call(Object java.lang.reflect.Fields.get(*));

but no success.
Thank you for your help.

Bye

--
Matteo






Back to the top