Returns the annotation instances declared on this method. This includes annotations which are defined
against method parameters, as well as type annotations declared on any usage within the method signature.
The
target()
of the returned annotation instances may be used to determine the
exact location of ths respective annotation instance.
The following is a non-exhaustive list of examples of annotations returned by this method:
@MyMethodAnnotation
public void foo() {...}
public void foo(
@MyParamAnnotation int param) {...}
public void foo(List<
@MyTypeAnnotation> list) {...}
public <
@AnotherTypeAnnotation T> void foo(T t) {...}