public class TypeUtils extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static JetType |
NO_EXPECTED_TYPE |
| Constructor and Description |
|---|
TypeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canHaveSubtypes(JetTypeChecker typeChecker,
JetType type) |
static boolean |
dependsOnTypeConstructors(JetType type,
java.util.Collection<TypeConstructor> typeParameterConstructors) |
static boolean |
dependsOnTypeParameters(JetType type,
java.util.Collection<TypeParameterDescriptor> typeParameters) |
static boolean |
equalClasses(JetType type1,
JetType type2) |
static boolean |
equalsOrContainsAsArgument(JetType type,
JetType... possibleArgumentTypes) |
static boolean |
equalTypes(JetType a,
JetType b) |
static java.util.List<ClassDescriptor> |
getAllClassDescriptors(JetType type) |
static java.util.Set<JetType> |
getAllSupertypes(JetType type) |
static ClassDescriptor |
getClassDescriptor(JetType type) |
static java.util.List<TypeProjection> |
getDefaultTypeProjections(java.util.List<TypeParameterDescriptor> parameters) |
static java.util.List<JetType> |
getDefaultTypes(java.util.List<TypeParameterDescriptor> parameters) |
static java.util.List<JetType> |
getImmediateSupertypes(JetType type) |
static java.lang.String |
getTypeNameAndStarProjectionsString(java.lang.String name,
int size) |
static boolean |
hasNullableLowerBound(TypeParameterDescriptor typeParameterDescriptor) |
static boolean |
hasNullableSuperType(JetType type) |
static JetType |
intersect(JetTypeChecker typeChecker,
java.util.Set<JetType> types) |
static boolean |
isIntersectionEmpty(JetType typeA,
JetType typeB) |
static JetType |
makeNotNullable(JetType type) |
static JetType |
makeNullable(JetType type) |
static JetType |
makeNullableAsSpecified(JetType type,
boolean nullable) |
static JetType |
makeNullableIfNeeded(JetType type,
boolean nullable) |
static JetType |
makeUnsubstitutedType(ClassDescriptor classDescriptor,
JetScope unsubstitutedMemberScope) |
static JetType |
substituteParameters(ClassDescriptor clazz,
java.util.List<JetType> actualTypeParameters) |
static boolean |
typeConstructorUsedInType(TypeConstructor key,
JetType value) |
public static final JetType NO_EXPECTED_TYPE
public TypeUtils()
@NotNull public static JetType makeNullable(@NotNull JetType type)
@NotNull public static JetType makeNotNullable(@NotNull JetType type)
@NotNull public static JetType makeNullableAsSpecified(@NotNull JetType type, boolean nullable)
public static boolean isIntersectionEmpty(@NotNull JetType typeA, @NotNull JetType typeB)
@Nullable public static JetType intersect(@NotNull JetTypeChecker typeChecker, @NotNull java.util.Set<JetType> types)
public static boolean canHaveSubtypes(JetTypeChecker typeChecker, JetType type)
public static JetType makeNullableIfNeeded(JetType type, boolean nullable)
@NotNull public static JetType makeUnsubstitutedType(ClassDescriptor classDescriptor, JetScope unsubstitutedMemberScope)
@NotNull public static java.util.List<TypeProjection> getDefaultTypeProjections(java.util.List<TypeParameterDescriptor> parameters)
@NotNull public static java.util.List<JetType> getDefaultTypes(java.util.List<TypeParameterDescriptor> parameters)
@NotNull public static java.util.List<JetType> getImmediateSupertypes(@NotNull JetType type)
@NotNull public static java.util.Set<JetType> getAllSupertypes(@NotNull JetType type)
public static boolean hasNullableLowerBound(@NotNull TypeParameterDescriptor typeParameterDescriptor)
public static boolean hasNullableSuperType(@NotNull JetType type)
public static boolean equalClasses(@NotNull JetType type1, @NotNull JetType type2)
@Nullable public static ClassDescriptor getClassDescriptor(@NotNull JetType type)
@NotNull public static JetType substituteParameters(@NotNull ClassDescriptor clazz, @NotNull java.util.List<JetType> actualTypeParameters)
@NotNull public static java.util.List<ClassDescriptor> getAllClassDescriptors(@NotNull JetType type)
public static boolean equalTypes(@NotNull JetType a, @NotNull JetType b)
public static boolean typeConstructorUsedInType(@NotNull TypeConstructor key, @NotNull JetType value)
public static boolean dependsOnTypeParameters(@NotNull JetType type, @NotNull java.util.Collection<TypeParameterDescriptor> typeParameters)
public static boolean dependsOnTypeConstructors(@NotNull JetType type, @NotNull java.util.Collection<TypeConstructor> typeParameterConstructors)
public static boolean equalsOrContainsAsArgument(@Nullable JetType type, @NotNull JetType... possibleArgumentTypes)
@NotNull public static java.lang.String getTypeNameAndStarProjectionsString(@NotNull java.lang.String name, int size)