kotlinpoet / com.squareup.kotlinpoet / TypeVariableName

TypeVariableName

class TypeVariableName : TypeName

Properties

bounds

val bounds: List<TypeName>

name

val name: String

reified

val reified: Boolean

variance

val variance: KModifier?

Inherited Properties

annotations

val annotations: List<AnnotationSpec>

isAnnotated

val isAnnotated: Boolean

nullable

val nullable: Boolean

Functions

annotated

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

asNonNullable

fun asNonNullable(): TypeVariableName

asNullable

fun asNullable(): TypeVariableName

reified

fun reified(value: Boolean = true): TypeVariableName

withBounds

fun withBounds(vararg bounds: Type): TypeVariableName
fun withBounds(vararg bounds: KClass<*>): TypeVariableName
fun withBounds(vararg bounds: TypeName): TypeVariableName
fun withBounds(bounds: List<TypeName>): TypeVariableName

withoutAnnotations

fun withoutAnnotations(): TypeVariableName

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

invoke

operator fun invoke(name: String, variance: KModifier? = null): TypeVariableName

Returns type variable named name with variance and without bounds.

operator fun invoke(name: String, vararg bounds: TypeName, variance: KModifier? = null): TypeVariableName
operator fun invoke(name: String, vararg bounds: KClass<*>, variance: KModifier? = null): TypeVariableName
operator fun invoke(name: String, vararg bounds: Type, variance: KModifier? = null): TypeVariableName

Returns type variable named name with variance and bounds.