private static void collectAndCacheMethodAnnotations(Index annotationIndex, ClassLoader classLoader,
DotName annotationType, Map<String, List<CachedMethod>> targetCache) {
for (AnnotationInstance ai : annotationIndex.getAnnotations(annotationType)) {
if (ai.target() instanceof MethodInfo) {
MethodInfo methodInfo = (MethodInfo) ai.target();
ClassInfo classInfo = methodInfo.declaringClass();
String clazz = classInfo.name().toString();
List<CachedMethod> methodList = targetCache.get(clazz);
if (methodList == null) {
methodList = new LinkedList<CachedMethod>();
targetCache.put(clazz, methodList);