Annotations and Streams API
Michael Ernst
mernst at cs.washington.edu
Sat Jan 11 05:13:56 PST 2014
> I understand that this is inaccessible to the Annotations API
> because it is written inside a method body. Is that right ?
Right. The API doesn't give a way to access annotations within a method
body.
Specific compilers have different ways to access annotations within a
method body. Currently, a pluggable type-checker has to be built upon
some specific compiler and use those mechanisms.
-Mike
> Subject: Annotations and Streams API
> From: Mohan Radhakrishnan <radhakrishnan.mohan at gmail.com>
> To: type-annotations-dev <type-annotations-dev at openjdk.java.net>
> Date: Sat, 11 Jan 2014 10:59:33 +0530
>
> Hi,
> I understand that this is inaccessible to the Annotations API
> because it is written inside a method body. Is that right ?
>
> That is intended for pluggable type checkers ?
> List list1 = list.
>
> stream().
>
> map(p::matcher).
>
> filter(Matcher::find).map(matcher -> matcher.group()).
>
> collect(Collectors.toCollection(@ NonNull
> ArrayList::new));
>
> Thanks.
More information about the type-annotations-dev
mailing list