Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] @method

Hello,

please forget my mail before. I don't know why but now it works as
expected. Perhaps I forgot to clean and rebuild the project.

regards
Oliver


boehm@xxxxxxxxxx schrieb am 25.04.2005, 20:24:01:
> 
> Hello again,
> 
> I attach @Logged to all getter methods in the Rechnung class:
> 
>     declare @method: public * Rechnung.get*(..): @Logged;
> 
> Depending on this annotation I define a pointcut:
> 
>     after() : execution(@Logged * *..*(..)) {
>         log.info(thisJoinPoint);
>     }
> 
> It works as expected. But when I try to access the annotation I get a
> null result. Here the access:
> 
>     public void testMethodAnnoation() throws SecurityException,
>             NoSuchMethodException {
>         Method m = Rechnung.class.getMethod("getSumme", (Class[]) null);
>         Annotation a = m.getAnnotation(Logged.class);
>         assertNotNull(a);
>     }
> 
> When I put the @Logged annotation manually before the getSumme()-method
> I get the Logged-annotation in the test method. Is this normal?
> 
> regards
> Oliver
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev


Back to the top