Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How do define the pointcut dynamicly

Quote [Lendvai Attila]:

:: Hi, all,
:: :: I create a pointcut like this:
:: public  aspect TestAspect{
::     pointcut operation : call (* MyClass.*(..));
:: }
:: :: I want to write a ini file to record the pointcut scope, in :: this example :: is "* MyClass.*(..)".
:: The ini file maybe like this:
:: * MyClass.*(..)
:: :: and later I change it to:
:: public  MyClass.*(..)
:: :: I think if I can bind the pointcut dynamiclly, we needn't change the :: source file.
:: I wonder whether AspectJ can provide this ability?

AspectJ is a static environment just like Java, which is a little
'dynamic' due to the new load time weaving (LTW) feature.

But even with LTW you can't dynamically invoke the compiler to recompile
your aspects, not to mention doing that automatically based on
depencencies. That is the scope of dynamic languages with integrated
persistence, which Java isn't one of. Could be, but it's vm written in
C++ (?) is not the best environmnet to implement such features... :)

This does not mean that AspectJ could not implement special support for
this, but I don't know of that.

Hope it helps,

I think at some point there was a discussion about AspectJ and Spring which offered something near.

./pope


- 101

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




Back to the top