org.jetbrains.kotlin.descriptors.impl
Class AbstractTypeParameterDescriptor
java.lang.Object
org.jetbrains.kotlin.descriptors.annotations.AnnotatedImpl
org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorImpl
org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorNonRootImpl
org.jetbrains.kotlin.descriptors.impl.AbstractTypeParameterDescriptor
- All Implemented Interfaces:
- ClassifierDescriptor, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, Named, TypeParameterDescriptor
- Direct Known Subclasses:
- AbstractLazyTypeParameterDescriptor, TypeParameterDescriptorImpl
public abstract class AbstractTypeParameterDescriptor
- extends DeclarationDescriptorNonRootImpl
- implements TypeParameterDescriptor
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jetbrains.kotlin.descriptors.Named |
getName |
AbstractTypeParameterDescriptor
protected AbstractTypeParameterDescriptor(@NotNull
StorageManager storageManager,
@NotNull
DeclarationDescriptor containingDeclaration,
@NotNull
Annotations annotations,
@NotNull
Name name,
@NotNull
Variance variance,
boolean isReified,
int index,
@NotNull
SourceElement source,
@NotNull
SupertypeLoopChecker supertypeLoopChecker)
reportSupertypeLoopError
protected abstract void reportSupertypeLoopError(@NotNull
KotlinType type)
resolveUpperBounds
@NotNull
protected abstract java.util.List<KotlinType> resolveUpperBounds()
getVariance
@NotNull
public Variance getVariance()
- Specified by:
getVariance in interface TypeParameterDescriptor
isReified
public boolean isReified()
- Specified by:
isReified in interface TypeParameterDescriptor
getIndex
public int getIndex()
- Specified by:
getIndex in interface TypeParameterDescriptor
isCapturedFromOuterDeclaration
public boolean isCapturedFromOuterDeclaration()
- Description copied from interface:
TypeParameterDescriptor
- Is current parameter just a copy of another type parameter (getOriginal) from outer declaration
to be used for type constructor of inner declaration (i.e. inner class).
If this method returns true:
1. Containing declaration for current parameter is the inner one
2. 'getOriginal' returns original type parameter from outer declaration
3. 'getTypeConstructor' is the same as for original declaration (at least in means of 'equals')
- Specified by:
isCapturedFromOuterDeclaration in interface TypeParameterDescriptor
getUpperBounds
@NotNull
public java.util.List<KotlinType> getUpperBounds()
- Specified by:
getUpperBounds in interface TypeParameterDescriptor
getTypeConstructor
@NotNull
public final TypeConstructor getTypeConstructor()
- Specified by:
getTypeConstructor in interface ClassifierDescriptor- Specified by:
getTypeConstructor in interface TypeParameterDescriptor
getDefaultType
@NotNull
public SimpleType getDefaultType()
- Specified by:
getDefaultType in interface ClassifierDescriptor
getOriginal
@NotNull
public TypeParameterDescriptor getOriginal()
- Specified by:
getOriginal in interface ClassifierDescriptor- Specified by:
getOriginal in interface DeclarationDescriptor- Specified by:
getOriginal in interface DeclarationDescriptorWithSource- Specified by:
getOriginal in interface TypeParameterDescriptor- Overrides:
getOriginal in class DeclarationDescriptorNonRootImpl
- Returns:
- The descriptor that corresponds to the original declaration of this element.
A descriptor can be obtained from its original by substituting type arguments (of the declaring class
or of the element itself).
returns
this object if the current descriptor is original itself
substitute
@NotNull
@Deprecated
public TypeParameterDescriptor substitute(@NotNull
TypeSubstitutor substitutor)
- Deprecated.
- Specified by:
substitute in interface DeclarationDescriptor- Specified by:
substitute in interface TypeParameterDescriptor
accept
public <R,D> R accept(DeclarationDescriptorVisitor<R,D> visitor,
D data)
- Specified by:
accept in interface DeclarationDescriptor