[JSR308] Annotations on String and primitive literals?

Neal Gafter gafter at google.com
Thu May 8 14:37:31 EDT 2008


Jsr308 is adding support for annotations on types.  Classes are types.
String literals are not types.

On Thu, May 8, 2008 at 10:44 AM, Artemus Harper <subanark at gmail.com> wrote:

> Is there any reason that annotations are permitted on class literals, but
> not on String, or primitive literals.
> E.g.
> I might want to have:
> URL resource = MyClass.class.getResource(@Resource "someResource");
>
> Where the Resource checker would ensure that there is a resource called
> "someResource" relative to MyClass.
>
> --
> Artemus Harper
> _______________________________________________
> JSR308 mailing list
> JSR308 at lists.csail.mit.edu
> https://lists.csail.mit.edu/mailman/listinfo/jsr308
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.csail.mit.edu/pipermail/jsr308/attachments/20080508/16777e24/attachment.htm 


More information about the JSR308 mailing list