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

JvmPrimitiveType

class JvmPrimitiveType : AbstractJvmType (source)

A JvmPrimitive type represents a primitive type.

Constructors

<init>

JvmPrimitiveType(name: String, nullValue: String, size: Int, abbrevName: String = name)

Properties

abbrevName

val abbrevName: String

a commonly used abbreviation of this type's name

box

val box: JvmPrimitiveBoxType

isNullable

val isNullable: Boolean

Whether or not the referenced type is nullable.

nullValue

val nullValue: String

the null-value of this primitive type

packageName

val packageName: String

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

size

val size: Int

the size (in bytes) of this type

Inherited Properties

className

open val className: String

the name of the type

typeParameters

val typeParameters: Array<out IJvmType>?

Functions

nullable

fun nullable(): JvmPrimitiveType

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.