I could possibly see the matching of the covariant one a bug, but i'd
need to think a little more.
This pointcut matches only the top level declaration:
declare warning: execution(Collection<? extends Test> *.test( .. )) &&
!execution(Collection<Test> *.test(..)) :
"Covariant";
Andy
On 23 April 2010 03:02, Mohan Radhakrishnan
<[email protected]> wrote:
> Hi,
> This joinpoint matches both methods with Covariant return
> types properly. Is it possible to match only one ?
>
> Thanks,
> Mohan
>
> declare warning: execution(Collection<? extends Test> *.test( .. )) :
> "Covariant";
>
> public class CovariantSuper {
>
> public Collection<? extends Test> test(){
> return null;
> }
>
> public Class<?> test1(){
> return null;
> }
>
> }
>
> package com.test;
>
> import java.util.Collection;
>
> public class CovariantSub extends CovariantSuper{
>
> public Collection<Test> test(){
> return null;
> }
>
> �...@suppresswarnings("unchecked") // This is required.
> Otherwise I don't see the eclipse marker.
> public Class test1(){
> return null;
> }
>
> }
> _______________________________________________
> 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