Parameter

A parameter of a function or other callable declaration.

Types

Link copied to clipboard

The kind of a parameter.

Properties

Link copied to clipboard
open override val allAnnotations: List<AnnotationInfo>

All annotations on this element with their source information.

Link copied to clipboard
open override val annotations: List<Annotation>

All annotations on this element, including inherited ones.

Link copied to clipboard
open override val declaredAnnotations: List<Annotation>

Annotations declared directly on this element.

Link copied to clipboard

The global index of the parameter in the list of all parameters.

Link copied to clipboard

Whether the parameter has a default value.

Link copied to clipboard

The index of the parameter in the list of parameters of its Kind.

Link copied to clipboard

The kind of the parameter: dispatch, context, extension, or value.

Link copied to clipboard

The parameter's name.

Link copied to clipboard
val type: KType

The parameter's type.

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.

Link copied to clipboard
fun checkValue(value: Any?)

Throws an exception if the parameter cannot accept the given value. Not throwing does not guarantee acceptance (although it typically will be accepted).

Link copied to clipboard

Returns true if the parameter can possibly accept the given value. Returning true does not guarantee acceptance (although it typically will be accepted), but returning false does guarantee rejection.

Link copied to clipboard
open override fun toString(): String