Re: [abc-users] abc and Generics

From: Eric Bodden <eric.bodden_at_mail.mcgill.ca>
Date: Mon, 20 Apr 2009 23:09:45 -0400

Hi Saurabh.

abc supports generics in Java code when you use any of the abc.ja.*
extensions. However, it does not yet support generics in aspects
members such as pointcuts or advice. Hence, your particular example
would unfortunately not work in abc, as of now.

Eric

2009/4/20 Saurabh Shukla <sshukla_at_cs.utexas.edu>:
> Hi,
>
> I have recently started exploring abc and would like to know if it
> supports Generics.
> For example can I write a pointcut and apply the "before" advice to it
> to insert a call
> to another method depending on the type of the argument passed to the
> pointcut?
>
> Something like...
>
> before(MyClass mc, <T> type) : call(* MyClass.add*(<T>))
>                                                  && args(type)
>                                                  && target(mc) {
>               mc.start(type);
> }
>
> Depending upon the type <T>, appropriate overloaded method for
> "MyClass.start" will be called.
>
> If this is not supported then is it possible to extend abc to support this?
>
> Thanks,
> ----- Saurabh
>
>

-- 
Eric Bodden
Sable Research Group, McGill University
Montréal, Québec, Canada
Received on Tue Apr 21 2009 - 04:09:49 BST

This archive was generated by hypermail 2.2.0 : Tue Apr 21 2009 - 09:20:12 BST