private void visitFields(Set<Class<?>> types, AnnotationCache cache, TypeDescription typeDescription, boolean inheriting) {
typeDescription.getDeclaredFields().forEach(f -> {
Consumer<Annotation> addToCache = a -> types.forEach(t -> cache.addFieldAnnotation(t, f.getName(), a));
f.getDeclaredAnnotations()
.forEach(a -> cacheSupportedAnnotations(a, types, cache, addToCache, inheriting));
f.getType().getDeclaredAnnotations()
.forEach(a -> cacheSupportedAnnotations(a, types, cache, addToCache, inheriting));
});
typeDescription.getDeclaredMethods()
.filter(m -> m.getName().startsWith("get") && m.getName().length() > 3)
.forEach(m -> {
String methodName = m.getName();
String correspondingFieldName = Character.toLowerCase(methodName.charAt(3)) + methodName.substring(4);
Consumer<Annotation> addToCache = a -> types.forEach(t -> cache.addFieldAnnotation(t, correspondingFieldName, a));
m.getDeclaredAnnotations()
.forEach(a -> cacheSupportedAnnotations(a, types, cache, addToCache, inheriting));
});
}