Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] set pointcut on a field, and all its fields

My initial thought is that you just need to also include some pointcuts that match operations affecting the fields of the type of whatever localTranslation is:

set(* Vector3f+.*)

Andy.

2008/10/14 rikland <asdf@xxxxxxxxxxxxx>

Hi!

I need to make a pointcut when the field "localTranslation" on the target
Spatial is changed. The code below works great, but...

it's just that sometimes the localTranslations fields are changed, like this
f.ex: localTranslation.x = 0.5;

I need the pointcut to include those changes of localTranslation too. Is
there a solution to this?

pointcut localTranslationSet(Spatial spatial, Vector3f localTranslation):
       set(Vector3f Spatial+.localTranslation)
       && !withincode(Spatial+.new(..))
       && target(spatial)
       && args(localTranslation);

after(Spatial spatial, Vector3f localTranslation) returning:
localTranslationSet(spatial, localTranslation) {
       if(shouldNotBeIgnored(spatial)) {
               JMEEventReporter.localTranslationSet(new
LocalTranslationSetEvent(getAddress(spatial), spatial.hashCode(),
localTranslation));
       }
}
--
View this message in context: http://www.nabble.com/set-pointcut-on-a-field%2C-and-all-its-fields-tp19980025p19980025.html
Sent from the AspectJ - users mailing list archive at Nabble.com.

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top