Skip to content

Commit

Permalink
Whatever
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Jun 22, 2024
1 parent a193346 commit 2256baa
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ internal fun Resolver.getClassDeclarationByName(name: String): KSClassDeclaratio

internal fun <T : Annotation> KSAnnotated.getAnnotationsByType(annotationKClass: KClass<T>): Sequence<T> {
return this.annotations.filter {
it.shortName.getShortName() == annotationKClass.simpleName && it.annotationType.resolve().declaration
.qualifiedName?.asString() == annotationKClass.qualifiedName
it.shortName.getShortName() == annotationKClass.simpleName &&
it.annotationType.resolve().declaration
.qualifiedName?.asString() == annotationKClass.qualifiedName
}.map { it.toAnnotation(annotationKClass.java) }
}

Expand Down

0 comments on commit 2256baa

Please sign in to comment.