Parameters

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

  • Dispatch receiver (if present)

  • Any context parameters

  • Extension receiver (if present)

  • Any value parameters.

Properties

Link copied to clipboard

Gets the context parameters. Does not allocate a new list.

Link copied to clipboard

Gets the dispatch receiver parameter, if present.

Link copied to clipboard

Gets the extension receiver parameter, if present.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val size: Int
Link copied to clipboard

Gets the value parameters. Does not allocate a new list.

Functions

Link copied to clipboard

Requires specifying a value for all parameters, aka args.size == this.size.

Link copied to clipboard
Link copied to clipboard
open operator override fun contains(element: Parameter): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<Parameter>): Boolean
Link copied to clipboard
fun context(indexInContextParameters: Int): Parameter

Gets the context parameter at indexInContextParameters in the list of context parameters.

Link copied to clipboard

Gets the number of parameters of a given kind.

Link copied to clipboard
operator fun get(name: String): Parameter?

Get the parameter named name, if present. Cannot be used with "this", as it could refer to the dispatch or extension receiver.

operator fun get(kind: Parameter.Kind, indexInKind: Int): Parameter

Get a parameter by its index in its own kind. For example, get(Kind.VALUE, 2) gets the third value parameter.

open operator override fun get(index: Int): Parameter
Link copied to clipboard
fun globalIndex(kind: Parameter.Kind, indexInKind: Int): Int

Gets the index in this list of a parameter at indexInKind in its kind.

Link copied to clipboard
open override fun indexOf(element: Parameter): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<Parameter>
Link copied to clipboard
open override fun lastIndexOf(element: Parameter): Int
Link copied to clipboard
open override fun listIterator(): ListIterator<Parameter>
open override fun listIterator(index: Int): ListIterator<Parameter>
Link copied to clipboard

Get the start offset in the parameter list of the given kind. Returning a value does not guarantee that parameters of type kind are present.

Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): List<Parameter>
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun value(indexInValueParameters: Int): Parameter

Gets the value parameter at indexInValueParameters in the list of value parameters.