Top Methods
kotlin.reflect.jvm.internal.impl.types

public Interface TypeConstructor

extends kotlin.reflect.jvm.internal.impl.types.model.TypeConstructorMarker
Known Direct Implementers
kotlin.reflect.jvm.internal.impl.types.ClassTypeConstructorImpl, kotlin.reflect.jvm.internal.impl.types.AbstractClassTypeConstructor
Imports
kotlin.annotations.jvm.ReadOnly, org.jetbrains.annotations.NotNull, .Nullable, kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns, kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor, .TypeParameterDescriptor, kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner, kotlin.reflect.jvm.internal.impl.types.model.TypeConstructorMarker, java.util.Collection, .List

Method Summary

Modifier and TypeMethod and Description
public @NotNull KotlinBuiltIns
public @Nullable ClassifierDescriptor
public @NotNull List<TypeParameterDescriptor>

Returns:

list of parameters for type constructor, both from current declaration and the outer one
getParameters
()

It may differ from ClassDescriptor.declaredParameters if the class is inner, in such case it also contains additional parameters from outer declarations.

public @NotNull Collection<kotlin.reflect.jvm.internal.impl.types.KotlinType>
public boolean
isDenotable()

If the type is non-denotable, it can't be written in code directly, it only can appear internally inside a type checker.

public boolean
isFinal()

Cannot have subtypes.

public @NotNull TypeConstructor
refine(@NotNull kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner kotlinTypeRefiner)

Returns TypeConstructor, refined with passed refined, if that makes sense for this specific typeConstructor Contract: - returned TypeConstructor has refined supertypes, i.e. it has correct supertypes resolved as if we were looking at them from refiner's module - IT DOES NOT ADD PLATFORM DECLARED SUPERTYPES!!!!!!!!

Method Detail

getBuiltInsback to summary
public @NotNull KotlinBuiltIns getBuiltIns()
Annotations
@NotNull
getDeclarationDescriptorback to summary
public @Nullable ClassifierDescriptor getDeclarationDescriptor()
Annotations
@Nullable
getParametersback to summary
public @NotNull List<TypeParameterDescriptor> getParameters()

It may differ from ClassDescriptor.declaredParameters if the class is inner, in such case it also contains additional parameters from outer declarations.

Returns:@NotNull List<TypeParameterDescriptor>

list of parameters for type constructor, both from current declaration and the outer one

Annotations
@NotNull
@ReadOnly
getSupertypesback to summary
public @NotNull Collection<kotlin.reflect.jvm.internal.impl.types.KotlinType> getSupertypes()
Annotations
@NotNull
@ReadOnly
isDenotableback to summary
public boolean isDenotable()

If the type is non-denotable, it can't be written in code directly, it only can appear internally inside a type checker. Examples: intersection type or number value type.

isFinalback to summary
public boolean isFinal()

Cannot have subtypes.

refineback to summary
public @NotNull TypeConstructor refine(@NotNull kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner kotlinTypeRefiner)

Returns TypeConstructor, refined with passed refined, if that makes sense for this specific typeConstructor Contract: - returned TypeConstructor has refined supertypes, i.e. it has correct supertypes resolved as if we were looking at them from refiner's module - IT DOES NOT ADD PLATFORM DECLARED SUPERTYPES!!!!!!!! - all other similar sources of KotlinTypes/Descriptors should return refined instances as well That method is part of internal refinement infrastructure, so IT SHOULD NOT BE CALLED from anywhere except methods from refinement (like methods of KotlinTypeRefinerImpl or KotlinType.refine Implementation notice: - the most interesting part happens in 'AbstractTypeConstructor': it returns 'ModuleViewTypeConstructor', which will refine supertypes when queried for them - also, there are several typeConstructors, which do not inherit AbstractTypeConstructor, but have some component types/descriptors (e.g. IntersectionTypeConstructor) -- they refine their content manually by recursing using refiner - finally, most special typeConstructors have no meaningful refinement and return null (i.e. UninferredTypeParameterConstructor)

Annotations
@TypeRefinement
@NotNull