kotlinpoet / com.squareup.kotlinpoet / LambdaTypeName

LambdaTypeName

class LambdaTypeName : TypeName

Properties

parameters

val parameters: List<ParameterSpec>

receiver

val receiver: TypeName?

returnType

val returnType: TypeName

suspending

val suspending: Boolean

Inherited Properties

annotations

val annotations: List<AnnotationSpec>

isAnnotated

val isAnnotated: Boolean

nullable

val nullable: Boolean

Functions

annotated

fun annotated(annotations: List<AnnotationSpec>): LambdaTypeName

asNonNullable

fun asNonNullable(): LambdaTypeName

asNonSuspending

fun asNonSuspending(): LambdaTypeName

asNullable

fun asNullable(): LambdaTypeName

asSuspending

fun asSuspending(): LambdaTypeName

withoutAnnotations

fun withoutAnnotations(): LambdaTypeName

Inherited Functions

annotated

fun annotated(vararg annotations: AnnotationSpec): TypeName

equals

open fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Companion Object Functions

get

fun get(receiver: TypeName? = null, parameters: List<ParameterSpec> = emptyList(), returnType: TypeName): LambdaTypeName
fun get(receiver: TypeName? = null, vararg parameters: TypeName = emptyArray(), returnType: TypeName): LambdaTypeName
fun get(receiver: TypeName? = null, vararg parameters: ParameterSpec = emptyArray(), returnType: TypeName): LambdaTypeName

Returns a lambda type with returnType and parameters listed in parameters.

Extension Functions

jvmSuppressWildcards

fun TypeName.jvmSuppressWildcards(suppress: Boolean = true): TypeName

jvmWildcard

fun TypeName.jvmWildcard(): TypeName