Top Inners Fields Constructors Methods
kotlin.reflect.jvm.internal.impl.types

public Class TypeSubstitutor

extends Object
implements TypeSubstitutorMarker
Class Inheritance
All Implemented Interfaces
kotlin.reflect.jvm.internal.impl.types.model.TypeSubstitutorMarker
Imports
kotlin.jvm.functions.Function1, org.jetbrains.annotations.NotNull, .Nullable, kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns, kotlin.reflect.jvm.internal.impl.builtins.StandardNames, kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations, kotlin.reflect.jvm.internal.impl.descriptors.annotations.CompositeAnnotations, kotlin.reflect.jvm.internal.impl.descriptors.annotations.FilteredAnnotations, kotlin.reflect.jvm.internal.impl.name.FqName, kotlin.reflect.jvm.internal.impl.resolve.calls.inference.CapturedTypeConstructorKt, kotlin.reflect.jvm.internal.impl.types.checker.NewCapturedTypeConstructor, kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind, kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils, kotlin.reflect.jvm.internal.impl.types.model.TypeSubstitutorMarker, kotlin.reflect.jvm.internal.impl.types.typeUtil.TypeUtilsKt, kotlin.reflect.jvm.internal.impl.types.typesApproximation.CapturedTypeApproximationKt, kotlin.reflect.jvm.internal.impl.utils.ExceptionUtilsKt, java.util.ArrayList, .List, .Map

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static enum

Field Summary

Modifier and TypeField and Description
public static final TypeSubstitutor
private static final int
private final @NotNull kotlin.reflect.jvm.internal.impl.types.TypeSubstitution

Constructor Summary

AccessConstructor and Description
protected
TypeSubstitutor(@NotNull kotlin.reflect.jvm.internal.impl.types.TypeSubstitution substitution)

Method Summary

Modifier and TypeMethod and Description
private static void
assertRecursionDepth(int recursionDepth, TypeProjection projection, kotlin.reflect.jvm.internal.impl.types.TypeSubstitution substitution)

public static @NotNull kotlin.reflect.jvm.internal.impl.types.Variance
combine(@NotNull kotlin.reflect.jvm.internal.impl.types.Variance typeParameterVariance, @NotNull TypeProjection typeProjection)

public static @NotNull kotlin.reflect.jvm.internal.impl.types.Variance
combine(@NotNull kotlin.reflect.jvm.internal.impl.types.Variance typeParameterVariance, @NotNull kotlin.reflect.jvm.internal.impl.types.Variance projectionKind)

private static TypeSubstitutor.VarianceConflictType
conflictType(kotlin.reflect.jvm.internal.impl.types.Variance position, kotlin.reflect.jvm.internal.impl.types.Variance argument)

public static @NotNull TypeSubstitutor
create(@NotNull kotlin.reflect.jvm.internal.impl.types.TypeSubstitution substitution)

public static @NotNull TypeSubstitutor
public static @NotNull TypeSubstitutor
create(@NotNull kotlin.reflect.jvm.internal.impl.types.KotlinType context)

public static @NotNull TypeSubstitutor
createChainedSubstitutor(@NotNull kotlin.reflect.jvm.internal.impl.types.TypeSubstitution first, @NotNull kotlin.reflect.jvm.internal.impl.types.TypeSubstitution second)

private static @NotNull kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations
filterOutUnsafeVariance(@NotNull kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations annotations)

public @NotNull kotlin.reflect.jvm.internal.impl.types.TypeSubstitution
public boolean
private static @NotNull TypeProjection
projectedTypeForConflictedTypeWithUnsafeVariance(@NotNull kotlin.reflect.jvm.internal.impl.types.KotlinType originalType, @NotNull TypeProjection substituted, @Nullable TypeParameterDescriptor typeParameter, @NotNull TypeProjection originalProjection)

public @NotNull TypeSubstitutor
public @NotNull TypeSubstitutor
public @NotNull kotlin.reflect.jvm.internal.impl.types.KotlinType
safeSubstitute(@NotNull kotlin.reflect.jvm.internal.impl.types.KotlinType type, @NotNull kotlin.reflect.jvm.internal.impl.types.Variance howThisTypeIsUsed)

private static String
public @Nullable kotlin.reflect.jvm.internal.impl.types.KotlinType
substitute(@NotNull kotlin.reflect.jvm.internal.impl.types.KotlinType type, @NotNull kotlin.reflect.jvm.internal.impl.types.Variance howThisTypeIsUsed)

public @Nullable TypeProjection
private TypeProjection
substituteCompoundType(TypeProjection originalProjection, int recursionDepth)

private List<TypeProjection>
substituteTypeArguments(List<TypeParameterDescriptor> typeParameters, List<TypeProjection> typeArguments, int recursionDepth)

public @Nullable TypeProjection
private @NotNull TypeProjection
unsafeSubstitute(@NotNull TypeProjection originalProjection, @Nullable TypeParameterDescriptor typeParameter, int recursionDepth)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTYback to summary
public static final TypeSubstitutor EMPTY
MAX_RECURSION_DEPTHback to summary
private static final int MAX_RECURSION_DEPTH
substitutionback to summary
private final @NotNull kotlin.reflect.jvm.internal.impl.types.TypeSubstitution substitution
Annotations
@NotNull

Constructor Detail

TypeSubstitutorback to summary
protected TypeSubstitutor(@NotNull kotlin.reflect.jvm.internal.impl.types.TypeSubstitution substitution)

Method Detail

assertRecursionDepthback to summary
private static void assertRecursionDepth(int recursionDepth, TypeProjection projection, kotlin.reflect.jvm.internal.impl.types.TypeSubstitution substitution)
combineback to summary
public static @NotNull kotlin.reflect.jvm.internal.impl.types.Variance combine(@NotNull kotlin.reflect.jvm.internal.impl.types.Variance typeParameterVariance, @NotNull TypeProjection typeProjection)
Annotations
@NotNull
combineback to summary
public static @NotNull kotlin.reflect.jvm.internal.impl.types.Variance combine(@NotNull kotlin.reflect.jvm.internal.impl.types.Variance typeParameterVariance, @NotNull kotlin.reflect.jvm.internal.impl.types.Variance projectionKind)
Annotations
@NotNull
conflictTypeback to summary
private static TypeSubstitutor.VarianceConflictType conflictType(kotlin.reflect.jvm.internal.impl.types.Variance position, kotlin.reflect.jvm.internal.impl.types.Variance argument)
createback to summary
public static @NotNull TypeSubstitutor create(@NotNull kotlin.reflect.jvm.internal.impl.types.TypeSubstitution substitution)
Annotations
@NotNull
createback to summary
public static @NotNull TypeSubstitutor create(@NotNull Map<TypeConstructor, TypeProjection> substitutionContext)
Annotations
@NotNull
createback to summary
public static @NotNull TypeSubstitutor create(@NotNull kotlin.reflect.jvm.internal.impl.types.KotlinType context)
Annotations
@NotNull
createChainedSubstitutorback to summary
public static @NotNull TypeSubstitutor createChainedSubstitutor(@NotNull kotlin.reflect.jvm.internal.impl.types.TypeSubstitution first, @NotNull kotlin.reflect.jvm.internal.impl.types.TypeSubstitution second)
Annotations
@NotNull
filterOutUnsafeVarianceback to summary
private static @NotNull kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations filterOutUnsafeVariance(@NotNull kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations annotations)
Annotations
@NotNull
getSubstitutionback to summary
public @NotNull kotlin.reflect.jvm.internal.impl.types.TypeSubstitution getSubstitution()
Annotations
@NotNull
isEmptyback to summary
public boolean isEmpty()
projectedTypeForConflictedTypeWithUnsafeVarianceback to summary
private static @NotNull TypeProjection projectedTypeForConflictedTypeWithUnsafeVariance(@NotNull kotlin.reflect.jvm.internal.impl.types.KotlinType originalType, @NotNull TypeProjection substituted, @Nullable TypeParameterDescriptor typeParameter, @NotNull TypeProjection originalProjection)
Annotations
@NotNull
replaceWithContravariantApproximatingSubstitutionback to summary
public @NotNull TypeSubstitutor replaceWithContravariantApproximatingSubstitution()
Annotations
@NotNull
replaceWithNonApproximatingSubstitutionback to summary
public @NotNull TypeSubstitutor replaceWithNonApproximatingSubstitution()
Annotations
@NotNull
safeSubstituteback to summary
public @NotNull kotlin.reflect.jvm.internal.impl.types.KotlinType safeSubstitute(@NotNull kotlin.reflect.jvm.internal.impl.types.KotlinType type, @NotNull kotlin.reflect.jvm.internal.impl.types.Variance howThisTypeIsUsed)
Annotations
@NotNull
safeToStringback to summary
private static String safeToString(Object o)
substituteback to summary
public @Nullable kotlin.reflect.jvm.internal.impl.types.KotlinType substitute(@NotNull kotlin.reflect.jvm.internal.impl.types.KotlinType type, @NotNull kotlin.reflect.jvm.internal.impl.types.Variance howThisTypeIsUsed)
Annotations
@Nullable
substituteback to summary
public @Nullable TypeProjection substitute(@NotNull TypeProjection typeProjection)
Annotations
@Nullable
substituteCompoundTypeback to summary
private TypeProjection substituteCompoundType(TypeProjection originalProjection, int recursionDepth) throws SubstitutionException
substituteTypeArgumentsback to summary
private List<TypeProjection> substituteTypeArguments(List<TypeParameterDescriptor> typeParameters, List<TypeProjection> typeArguments, int recursionDepth) throws SubstitutionException
substituteWithoutApproximationback to summary
public @Nullable TypeProjection substituteWithoutApproximation(@NotNull TypeProjection typeProjection)
Annotations
@Nullable
unsafeSubstituteback to summary
private @NotNull TypeProjection unsafeSubstitute(@NotNull TypeProjection originalProjection, @Nullable TypeParameterDescriptor typeParameter, int recursionDepth) throws SubstitutionException
Annotations
@NotNull
kotlin.reflect.jvm.internal.impl.types back to summary

private final Class TypeSubstitutor.SubstitutionException

extends Exception
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Constructor Detail

SubstitutionExceptionback to summary
public SubstitutionException(String message)
kotlin.reflect.jvm.internal.impl.types back to summary

private final Enum TypeSubstitutor.VarianceConflictType

extends Enum<TypeSubstitutor.VarianceConflictType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final TypeSubstitutor.VarianceConflictType
public static final TypeSubstitutor.VarianceConflictType
public static final TypeSubstitutor.VarianceConflictType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static TypeSubstitutor.VarianceConflictType
public static TypeSubstitutor.VarianceConflictType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

IN_IN_OUT_POSITIONback to summary
public static final TypeSubstitutor.VarianceConflictType IN_IN_OUT_POSITION
NO_CONFLICTback to summary
public static final TypeSubstitutor.VarianceConflictType NO_CONFLICT
OUT_IN_IN_POSITIONback to summary
public static final TypeSubstitutor.VarianceConflictType OUT_IN_IN_POSITION

Constructor Detail

VarianceConflictTypeback to summary
private VarianceConflictType()

Method Detail

valueOfback to summary
public static TypeSubstitutor.VarianceConflictType valueOf(String name)
valuesback to summary
public static TypeSubstitutor.VarianceConflictType[] values()