We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getMethodsAnnotatedWith() does not return methods with meta-annotations like getTypesAnnotatedWith
getMethodsAnnotatedWith()
getTypesAnnotatedWith
Example:
@Target({METHOD, ANNOTATION_TYPE}) @Retention(RUNTIME) @interface MetaMethod { } @MetaMethod @Target(METHOD) @Retention(RUNTIME) @interface AM {} @MetaMethod @Target(METHOD) @Retention(RUNTIME) @interface BM {} class A1 { @AM public void inA1() {} } class B1 { @BM public void inB1() {} } class A2 { @AM public void inA2() {} } public class Annotations { public static void main(String[] args) { Reflections reflections = new Reflections( new ConfigurationBuilder() .forPackages("org.jsondoc.springmvc.scanner") .addScanners(new MethodAnnotationsScanner())); System.out.println("MetaMethods:"); for (Method type: reflections.getMethodsAnnotatedWith(MetaMethod.class)) { System.out.println(type.getName()); } System.out.println("AnnotatedMethdos"); for (Method type: reflections.getMethodsAnnotatedWith(AM.class)) { System.out.println(type.getName()); } } }
prints
MetaMethods: AnnotatedMethdos inA2 inA1
expected:
MetaMethods: inA1 inA2 inB1 AnnotatedMethdos inA2 inA1
The text was updated successfully, but these errors were encountered:
#208 describes a similar inconsistency for type annotations.
Sorry, something went wrong.
Fix ronmamo#269
ec9dbf5
ec12ce2
Fix Issue ronmamo#269 - Meta annotations on methods are not resolved
617f047
No branches or pull requests
getMethodsAnnotatedWith()
does not return methods with meta-annotations likegetTypesAnnotatedWith
Example:
prints
expected:
The text was updated successfully, but these errors were encountered: