AnnotatedClassFinder

Utility class to find a class annotated with a particular annotation in a hierarchy.

Author

Phillip Webb

Artsiom Yudovin

Stephane Nicoll

Since

2.1.0

Constructors

Link copied to clipboard
constructor(annotationType: Class<out Annotation>)
Create a new instance with the annotationType to find.

Functions

Link copied to clipboard
open fun findFromClass(source: Class<out Any>): Class<out Any>
Find the first Class that is annotated with the target annotation, starting from the package defined by the given source up to the root.
Link copied to clipboard
open fun findFromPackage(source: String): Class<out Any>
Find the first Class that is annotated with the target annotation, starting from the package defined by the given source up to the root.