Hi -

If the variable is declared in the pointcut, it must be bound,
but you don't have to bind it using args(..), e.g.,

  target(subject) && target(arg)

But that sort of begs the question.  The abstract pointcut is supposed
to define a contract that implementors comply with, and you have no way
to comply with it since there is no argument for your join point.  If
you pretend to comply, it's not clear what's going to happen.  Here you
might have the source for the abstract aspect and understand the advice
on the join points picked out by the abstract pointcuts, but often 
programmers don't, and they don't know what would be the effect of not
complying.  

hmm.  Interesting!

Wes

------------Original Message------------
From: "Conway. Fintan (IT Solutions)" <[EMAIL PROTECTED]>
To: [email protected]
Date: Mon, Aug-21-2006 7:31 AM
Subject: [aspectj-users] Use null for args in pointcut
Hi *,

I have a problem where I have to extend a pointcut in a super aspect.  The 
signature of this pointcut is as follows :
protected abstract pointcut subjectChange(Subject s, Object args); 
One of the aspects which extends this super aspect does not require the 'args'  
parameter.
My overriding pointcut looks like :
protected pointcut subjectChange(Subject subj, Object arg) :
(
call(* Pot.add(..))
|| 
call(* Pot.refresh())
)
&& !within(PotObserverUtilTest)
&& target(subj)
&& args(arg); 
This pointcut matches the Pot.add method, since it does have an argument.  
However the Pot.refresh() method is not advised since it does not have any 
arguments.  I have to override the abstract pointcut.
Is there any way to get the Pot.refresh() advised in this scenario?  (args = 
null?)
Any advice gratefully appreciated,
Fintan 


* ** *** ** * ** *** ** * ** *** ** * 
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they 
are addressed. 
Any views or opinions presented are solely those of the author, and do not 
necessarily represent those of ESB. 
If you have received this email in error please notify the sender. 

Although ESB scans e-mail and attachments for viruses, it does not guarantee 
that either are virus-free and accepts no liability for any damage sustained 
as a result of viruses. 

* ** *** ** * ** *** ** * ** *** ** *
_______________________________________________ 
aspectj-users mailing list 
[email protected] 
https://dev.eclipse.org/mailman/listinfo/aspectj-users 

_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to