orbit-util / orbit.util.reflect / AnnotationUtils / findAnnotationInTree

findAnnotationInTree

fun <A : Annotation> findAnnotationInTree(clazz: Class<*>, annotation: Class<A>): A?

Searches the class, supertype and interfaces recursively for an annotation.

Parameters

clazz - The class to search on.

annotation - The annotation to search for.

Return
The instance of the annotation or null if no instance found.