[webbeans-dev] syntax problem in @Observes annotation

Gavin King gavin.king at gmail.com
Fri Jun 19 19:11:18 EDT 2009


Oooops! thanks mate

On Fri, Jun 19, 2009 at 2:58 PM, Dan Allen<dan.j.allen at gmail.com> wrote:
> In section 10.5.4 and 10.5.6, the spec requires that the @Observes
> annotation define a notify parameter which accepts the Notify enum. However,
> the Java compiler does not allow an annotation to define a method named
> notify().
>
> public @interface Observes
> {
>     Notify notify() default Notify.SYNCHRONOUSLY;
> }
>
> This annotation parameter will need to be renamed. I suggest
> "notifyObserver".
>
> public void observerMethod(@Observes(notifyObserver=IF_EXISTS) EventType
> event)
>
> -Dan
>
> --
> Dan Allen
> Senior Software Engineer, Red Hat | Author of Seam in Action
>
> http://mojavelinux.com
> http://mojavelinux.com/seaminaction
> http://in.relation.to/Bloggers/Dan
>
> NOTE: While I make a strong effort to keep up with my email on a daily
> basis, personal or other work matters can sometimes keep me away
> from my email. If you contact me, but don't hear back for more than a week,
> it is very likely that I am excessively backlogged or the message was
> caught in the spam filters.  Please don't hesitate to resend a message if
> you feel that it did not reach my attention.
>
> _______________________________________________
> webbeans-dev mailing list
> webbeans-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/webbeans-dev
>
>



-- 
Gavin King
gavin.king at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org




More information about the weld-dev mailing list