| Modifier and Type | Method and Description |
|---|---|
| public @NotNull KotlinBuiltIns | |
| public @Nullable ClassifierDescriptor | |
| public @NotNull List | Returns: list of parameters for type constructor, both from current declaration and the outer oneIt may differ from ClassDescriptor.declaredParameters if the class is inner, in such case it also contains additional parameters from outer declarations. |
| public @NotNull Collection | |
| 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 | |
| public @NotNull TypeConstructor | refine(@NotNull kotlin.
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!!!!!!!! |
| getBuiltIns | back to summary |
|---|---|
public @NotNull KotlinBuiltIns getBuiltIns()
| |
| getDeclarationDescriptor | back to summary |
|---|---|
public @Nullable ClassifierDescriptor getDeclarationDescriptor()
| |
| getParameters | back to summary |
|---|---|
| public @NotNull List It may differ from ClassDescriptor.declaredParameters if the class is inner, in such case it also contains additional parameters from outer declarations.
| |
| getSupertypes | back to summary |
|---|---|
| public @NotNull Collection | |
| isDenotable | back 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. | |
| isFinal | back to summary |
|---|---|
| public boolean isFinal() Cannot have subtypes. | |
| refine | back to summary |
|---|---|
| public @NotNull TypeConstructor refine(@NotNull kotlin. 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)
| |