org.jetbrains.kotlin.descriptors.impl
Class AbstractTypeParameterDescriptor

java.lang.Object
  extended by org.jetbrains.kotlin.descriptors.annotations.AnnotatedImpl
      extended by org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorImpl
          extended by org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorNonRootImpl
              extended by 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


Constructor Summary
protected AbstractTypeParameterDescriptor(StorageManager storageManager, DeclarationDescriptor containingDeclaration, Annotations annotations, Name name, Variance variance, boolean isReified, int index, SourceElement source, SupertypeLoopChecker supertypeLoopChecker)
           
 
Method Summary
<R,D> R
accept(DeclarationDescriptorVisitor<R,D> visitor, D data)
           
 SimpleType getDefaultType()
           
 int getIndex()
           
 TypeParameterDescriptor getOriginal()
           
 TypeConstructor getTypeConstructor()
           
 java.util.List<KotlinType> getUpperBounds()
           
 Variance getVariance()
           
 boolean isCapturedFromOuterDeclaration()
          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.
 boolean isReified()
           
protected abstract  void reportSupertypeLoopError(KotlinType type)
           
protected abstract  java.util.List<KotlinType> resolveUpperBounds()
           
 TypeParameterDescriptor substitute(TypeSubstitutor substitutor)
          Deprecated. 
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorNonRootImpl
getContainingDeclaration, getSource
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorImpl
acceptVoid, getName, toString, toString
 
Methods inherited from class org.jetbrains.kotlin.descriptors.annotations.AnnotatedImpl
getAnnotations
 
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.DeclarationDescriptorNonRoot
getContainingDeclaration
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptorWithSource
getSource
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptor
acceptVoid
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.Named
getName
 

Constructor Detail

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)
Method Detail

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