Re: pointcut patterns

Jonas BonĂ©r <[email protected]> Thu, 17 Apr 2003 07:22:43 +0200
Newsgroups gmane.comp.java.aspectwerkz
Message-ID <[email protected]>
Hi Stefan.

Thanks for trying AspectWerkz out.

1. Yesterday evening I committed support for class selectors for 
aspects, i.e. <aspect class="com.capa.*">. It's in the CVS.

2. The regexps follows standard way of writing regular expr. i.e. you 
can't write "get*" but "get.*" and not "*" but ".*". I will maybe later 
make it more intiutive. But since the patterns are standard regexps 
pretty much anything you want to match should be possible. Like f.e. 
"com.*.util.*" and so on.

3. At the moment you can't sepatate methods with the same name but 
different signatures. I have it on my task list but it is not 
implemented yet.

Sincerely, Jonas


Finkenzeller, Stefan wrote:
> Hi Jonas,
> 
> I tried out Aspectwerkz and have a couple of questions now about how to
> declare aspects/pointcuts in the aspectwerkz.xml. If you find some time to
> answer the following that'd be very much appreciated.
> 
> *	Is it possible to declare an aspect on all classes of e.g. a
> package? (Something like <aspect class="com.capa.*">)
> *	I tried some regex patterns on method pointcuts like "(get|set)" or
> "*", but that did not work. I could only use trivial patterns like "get" or
> "set" and therefore had to declare the pointcut specifically on each method
> of my class.
> *	If I have overloaded methods like 
> *	   public String doSomething(String s, Object o)
> *	   public String doSomething(String s)
>    public String doSomething()
> How could I define a pointcut in the xml file, so that only one of the
> overloaded methods would be advised?
> 
> Very cool framework!
> -Stefan
> 
> 
> 


-- 
Jonas
http://freeroller.net/page/jboner





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf