[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] perthis-clause with logical operators

This should work just fine. However, a better way would be to declare a named pointcut and then use the pointcut in the perthis() clause. Something like:

public aspect ScriptingAspect perthis(scriptableObject()) {
   pointcut scriptableObject() : this(XULComponent+) || this(ParametrizedRemoteCaller+;


On Fri, Feb 8, 2008 at 9:15 AM, Tobias Demuth <tobias_demuth@xxxxxx> wrote:

I'm currently enhancing a GUI-library with scripting-capabilities using AspectJ. Now I must control the instantiation-policy of the Aspect using the perthis()-clause. Currently I'm using this code:

public aspect ScriptingAspect perthis(this(XULComponent+) || this(ParametrizedRemoteCaller+)) {

This should instantiate a new ScriptingAspect-instance for each subclass of XULComponent or ParametrizedRemoteCaller. The compiler says it is ok, but I want to have this doublechecked by someone who knows more about AspectJ than I do. Will this clause work?

kind regards
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!

aspectj-users mailing list