Package-level declarations

Data models for Kotlin declarations.

Types

Link copied to clipboard

An element which has annotations.

Link copied to clipboard
data class AnnotationInfo(val annotation: Annotation, val source: KClass<*>?)

An annotation with its source class.

Link copied to clipboard
sealed class Callable : AnnotatedElement

The result of inspekting a function-like or property declaration.

Link copied to clipboard
Link copied to clipboard
sealed class Function : FunctionLike

The result of inspekting a function-like declaration that is a normal function, not a constructor.

Link copied to clipboard
sealed class FunctionLike : Callable

The result of inspekting a member that can be invoked like a function. Includes functions, constructors, and accessors.

Link copied to clipboard

The result of inspekting a class.

Link copied to clipboard

The result of inspekting a var property.

Link copied to clipboard

A parameter of a function or other callable declaration.

Link copied to clipboard
data class Parameters : List<Parameter>

The parameters of a callable. Parameters are ordered by kind (Parameter.Kind):

Link copied to clipboard
sealed class Property : Callable

The result of inspekting a property.

Link copied to clipboard
sealed class PropertyAccessor : Function

The result of inspekting a property accessor.

Link copied to clipboard

The result of inspekting property getter.

Link copied to clipboard

The result of inspekting property setter.

Link copied to clipboard

The result of inspekting a val property.

Link copied to clipboard

The result of inspekting simple function declaration, i.e. one declared with fun.

Link copied to clipboard
data class TypeParameter(val name: String, val index: Int, val variance: TypeParameter.Variance, val erasedUpperBounds: List<KType>, val isReified: Boolean, val annotations: List<Annotation>, val declaredAnnotations: List<Annotation>, val allAnnotations: List<AnnotationInfo>) : AnnotatedElement

A type parameter.

Functions

Link copied to clipboard
inline fun <T> AnnotatedElement.annotation(): T?

Get the first annotation of type T, or null if none is found.

Link copied to clipboard

Get all annotations of type T.