Skip to content

Instantly share code, notes, and snippets.

@raphw
Created January 12, 2016 15:26
Show Gist options
  • Save raphw/4a148485dd1baa34baec to your computer and use it in GitHub Desktop.
Save raphw/4a148485dd1baa34baec to your computer and use it in GitHub Desktop.
A receiver type is not resolved as a parameterized type.
public class Foo<T> {
void foo(Foo<@Bar T> this) {}
public static void main(String[] args) {
assert Foo.class.getDeclaredMethod("foo").getAnnotatedReceiverType() instanceof AnnotatedParameterizedType;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment