Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] staticinitialization and target class

Hello
I want to register those classes annotated with @Observer in a Registry class... I want this occurs in a static block of such classes:

    pointcut observerMethods(Class klass):
        staticinitialization(@Observer com..*)
        && target(klass);

   after(Class klass): observerMethods(klass) {
        // adding 'klass' into Registry

   }

but as I read in manual it is said staticinitialization has no target object... is this right? if yes, how can I obtain the Class of those classes. Can I declare a static-block for matching classes?

thanks
 
Regards,
Mohammad
--------------------------
Sun Certified Web Developer
Have a look at some pictures @ http://pixelshot.wordpress.com/



Back to the top