Created
May 25, 2020 17:56
-
-
Save qzagarese/cd020241d055248f2bf8749bc3f4e0da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get a reference to the "handle" method | |
Method handle = handlerType.getDeclaredMethod("handle", | |
new Class<?>[] { | |
ScanContext.class, FrameworkAnnotationContext.class | |
}); | |
// Create a FrameworkAnnotationContext instance by passing the annotation to process, | |
// the instance being scanned and the method where the annotation is placed | |
FrameworkAnnotationContext<Annotation> annotationContext = new FrameworkAnnotationContext<>(annotation, instance, m); | |
// Invoke the "handle" method | |
ScanContext newContext = (ScanContext) handle.invoke(handler, scanContext, annotationContext); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment