com.github.themrmilchmann.kraton.lang.jvm / JvmTypeReference

JvmTypeReference

open class JvmTypeReference : AbstractJvmType (source)

A reference to a java type.

Parameters

nullable - whether or not the referenced type is nullable

Constructors

<init>

JvmTypeReference(className: String, packageName: String?, vararg typeParameters: IJvmType, nullable: Boolean = false)

A reference to a java type.

Properties

packageName

open val packageName: String?

the name of the package of the represented type

Inherited Properties

className

open val className: String

the name of the type

isNullable

open val isNullable: Boolean

Whether or not the referenced type is nullable.

typeParameters

val typeParameters: Array<out IJvmType>?

Functions

nullable

open fun nullable(): JvmTypeReference

Returns a nullable version of this IJVMType.

Extension Functions

PARAM

fun IJvmType.PARAM(name: String, documentation: String): JavaParameter

Shortcut to create a new JavaParameter.

array

fun IJvmType.array(dim: Int = 1, nullable: Boolean = isNullable): JvmArrayType

Shortcut to create a new JvmArrayType.

asString

fun IJvmType.asString(from: JavaTopLevelType<*, *>?): String

member

fun IJvmType.member(className: String, vararg typeParameters: IJvmType, nullable: Boolean = false): JvmMemberType

Creates and returns a new IJvmType which holds a reference to a member of the receiver type.

Inheritors

JvmMemberType

class JvmMemberType : JvmTypeReference