in dsl/common/dsl-parser-common/src/main/kotlin/io/kotless/parser/processor/AnnotationProcessor.kt [17:27]
fun processClassesOrObjects(files: Set<KtFile>, binding: BindingContext, body: (KtClassOrObject, KtAnnotationEntry, KClass<*>) -> Unit) {
for (file in files) {
file.visitClassOrObject(filter = { classOrObject -> classOrObject.isAnnotatedWith(binding, annotations) }) { classOrObject ->
for (annotationKClass in annotations) {
classOrObject.getAnnotations(binding, annotationKClass).forEach { annotation ->
body(classOrObject, annotation, annotationKClass)
}
}
}
}
}