kotlinpoet / com.squareup.kotlinpoet / TypeVariableName

TypeVariableName

class TypeVariableName : TypeName

Properties

bounds

val bounds: List<TypeName>

isReified

val isReified: Boolean

name

val name: String

variance

val variance: KModifier?

Either KModifier.IN, KModifier.OUT, or null.

Inherited Properties

annotations

val annotations: List<AnnotationSpec>

isAnnotated

val isAnnotated: Boolean

isNullable

val isNullable: Boolean

Functions

copy

fun copy(nullable: Boolean, annotations: List<AnnotationSpec>): TypeVariableName
fun copy(nullable: Boolean = this.isNullable, annotations: List<AnnotationSpec> = this.annotations.toList(), bounds: List<TypeName> = this.bounds.toList(), reified: Boolean = this.isReified): TypeVariableName

Inherited Functions

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.

Extension Functions

jvmSuppressWildcards

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

jvmWildcard

fun TypeName.jvmWildcard(): TypeName