In places within the syntax we support enum matching directly, for example
an annotation value that is an enum:

aspect X {
  // Advise all methods marked @Trace except those with a tracelevel of none
  before(): execution(@Trace [EMAIL PROTECTED](TraceLevel.NONE) * *(..)) {
    System.err.println("tracing "+thisJoinPoint);
  }
}

There are no enhancement requests open to go any further than this right
now, feel free to open one.

cheers,
Andy.

2008/9/24 Mohan Radhakrishnan <[EMAIL PROTECTED]>

> Hi,
>
> Is this the only way to match a particular enum value ? I thought
> there would be a enum wildcard value matching or something like that.
>
>        @Pointcut(
>        "execution(List<T> getSameValue()) && target(testEnum) && if()")
>        public static boolean testPointcut1( TestEnum testEnum ){
>                return testEnum == TestEnum.Value2;
>        }
>
>        @Before("testPointcut1(testEnum)")
>        public void test1( TestEnum testEnum ) {
>                System.out.println( "Generics aspect [" + testEnum.ordinal()
> + "]" );
>        }
>
> Thanks,
> Mohan
> _______________________________________________
> 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