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

AbstractJvmType

abstract class AbstractJvmType : IJvmType (source)

A reference to a java type.

Properties

className

open val className: String

the name of the type

isNullable

open val isNullable: Boolean

Whether or not the referenced type is nullable.

packageName

open val packageName: String?

The name of the package in which this type is located.

typeParameters

val typeParameters: Array<out IJvmType>?

Inherited Properties

containerName

open val containerName: String

The class name of the outermost enclosing type.

enclosingType

open val enclosingType: IJvmType?

The enclosing type of this type, if any.

memberName

open val memberName: String

The name of this class dot prefixed with the name of it's enclosing type.

Inherited Functions

nullable

abstract fun nullable(): IJvmType

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

JvmGenericType

class JvmGenericType : AbstractJvmType

A type representing generic type.

JvmPrimitiveBoxType

class JvmPrimitiveBoxType : AbstractJvmType

A JvmPrimitiveBoxType represents the boxed version of a primitive type.

JvmPrimitiveType

class JvmPrimitiveType : AbstractJvmType

A JvmPrimitive type represents a primitive type.

JvmTypeReference

open class JvmTypeReference : AbstractJvmType

A reference to a java type.