[JSR308] @Target(ElementType.TYPE_USE)

Martín Rouaux martinfr at gmail.com
Mon Jun 23 23:42:34 EDT 2008


I've a question. I'm trying to implement an annotation for object creation.
There is an example provided by the documentation:

for object creation:
new @MyAnn List<String>(myNonEmptyStringSet)

However I'm getting a sintax error. How should I describe the Target of the
new Annotation?
@Target(ElementType.TYPE_USE)
public @interface MyAnn { ... }

I can't find the ElemenType.TYPE_USE value as the documentation says. All
the annotations provided are implemented using

@Target({FIELD, LOCAL_VARIABLE, METHOD, PARAMETER, TYPE})


Thanks. Martin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.csail.mit.edu/pipermail/jsr308/attachments/20080624/fe680052/attachment.htm 


More information about the JSR308 mailing list