Represents a type.
Type is usually either a class with optional type arguments, or a type parameter of some declaration, plus nullability.
- Inheritance
-
- Object
- KAnnotatedElement
- KType
- Available extensions
Properties
-
arguments
→ List<
KTypeProjection> -
Type arguments passed for the parameters of the classifier in this type.
no setter
- classifier → KClassifier?
-
The declaration of the classifier used in this type.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isMarkedNullable → Boolean
-
Returns
true
if this type was marked nullable in the source code.no setter - javaType → Type
-
Available on KType, provided by the KTypeExtension extension
Returns a Java Type instance corresponding to the given Kotlin type.no setter -
jvmErasure
→ KClass<
Any> -
Available on KType, provided by the KTypeExtension extension
Returns the KClass instance representing the runtime class to which this type is erased to on JVM.no setter -
members
→ Collection<
KCallable> -
Annotations which are present on this element.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isSubtypeOf(
KType other) → Boolean -
Available on KType, provided by the KTypeExtension extension
Returnstrue
ifthis
type is the same or is a subtype ofother
,false
otherwise. -
isSupertypeOf(
KType other) → Boolean -
Available on KType, provided by the KTypeExtension extension
Returnstrue
ifthis
type is the same or is a supertype ofother
,false
otherwise. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withNullability(
Boolean nullable) → KType -
Available on KType, provided by the KTypeExtension extension
Returns a new type with the same classifier, arguments and annotations as the given type, and with the given nullability.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited