Package-level declarations

Properties

Link copied to clipboard
val KSClassDeclaration.companionDeclaration: KSClassDeclaration?

Returns the companion object for this KSClassDeclaration or null if there is none.

Link copied to clipboard
val KSReferenceElement.isClassifierReference: Boolean

Checks whether this is a reference to a classifier.

Functions

Link copied to clipboard
inline fun <A : Annotation> KSAnnotated.getAnnotationByType(): KSAnnotation

Returns an KSAnnotation from A.

Link copied to clipboard
inline fun <A : Annotation> KSAnnotated.getAnnotationOfType(): A

Returns an KSAnnotation from A.

Link copied to clipboard
inline fun <A : Annotation> KSAnnotated.getAnnotationsByType(): Sequence<KSAnnotation>

Returns all KSAnnotations from A.

Link copied to clipboard
inline fun <A : Annotation> KSAnnotated.getAnnotationsOfType(): Sequence<A>

Returns all KSAnnotations from A.

Link copied to clipboard
inline fun <A : Annotation> Resolver.getSymbolsWithAnnotation(inDepth: Boolean = false): Sequence<KSAnnotated>

Get all symbols with specified annotation. Note that in multiple round processing, only symbols from deferred symbols of last round and symbols from newly generated files will be returned in this function.

Link copied to clipboard
inline fun <A : Annotation> KSAnnotated.isAnnotationPresent(): Boolean

Checks whether A is present on KSAnnotated.

Link copied to clipboard
inline fun <A : Annotation> KSAnnotation.isOfType(): Boolean

Checks whether an KSAnnotation is of type A.

inline fun <T> KSTypeReference.isOfType(): Boolean

Checks whether an KSTypeReference is of type T.

fun KSAnnotation.isOfType(qualifiedName: String): Boolean

Checks whether an KSAnnotation is of type by it's qualifiedName.

fun KSTypeReference.isOfType(qualifiedName: String, canBeTypeAlias: Boolean = true): Boolean

Checks whether an KSTypeReference is of type by it's qualifiedName.