org.jetbrains.kotlin.descriptors.impl
Class LazySubstitutingClassDescriptor

java.lang.Object
  extended by org.jetbrains.kotlin.descriptors.impl.LazySubstitutingClassDescriptor
All Implemented Interfaces:
Annotated, ClassDescriptor, ClassifierDescriptor, ClassOrPackageFragmentDescriptor, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, DeclarationDescriptorWithVisibility, MemberDescriptor, Named

public class LazySubstitutingClassDescriptor
extends java.lang.Object
implements ClassDescriptor


Constructor Summary
LazySubstitutingClassDescriptor(ClassDescriptor descriptor, TypeSubstitutor substitutor)
           
 
Method Summary
<R,D> R
accept(DeclarationDescriptorVisitor<R,D> visitor, D data)
           
 void acceptVoid(DeclarationDescriptorVisitor<java.lang.Void,java.lang.Void> visitor)
           
 Annotations getAnnotations()
           
 ClassDescriptor getCompanionObjectDescriptor()
           
 java.util.Collection<ConstructorDescriptor> getConstructors()
           
 DeclarationDescriptor getContainingDeclaration()
           
 java.util.List<TypeParameterDescriptor> getDeclaredTypeParameters()
          It may differ from 'typeConstructor.parameters' in current class is inner, 'typeConstructor.parameters' contains captured parameters from outer declaration.
 KotlinType getDefaultType()
           
 ClassKind getKind()
           
 MemberScope getMemberScope(java.util.List<? extends TypeProjection> typeArguments)
           
 MemberScope getMemberScope(TypeSubstitution typeSubstitution)
           
 Modality getModality()
           
 Name getName()
           
 ClassDescriptor getOriginal()
           
 SourceElement getSource()
           
 MemberScope getStaticScope()
           
 ReceiverParameterDescriptor getThisAsReceiverParameter()
           
 TypeConstructor getTypeConstructor()
           
 MemberScope getUnsubstitutedInnerClassesScope()
           
 MemberScope getUnsubstitutedMemberScope()
           
 ConstructorDescriptor getUnsubstitutedPrimaryConstructor()
           
 Visibility getVisibility()
           
 boolean isCompanionObject()
           
 boolean isData()
           
 boolean isInner()
           
 ClassDescriptor substitute(TypeSubstitutor substitutor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazySubstitutingClassDescriptor

public LazySubstitutingClassDescriptor(ClassDescriptor descriptor,
                                       TypeSubstitutor substitutor)
Method Detail

getTypeConstructor

@NotNull
public TypeConstructor getTypeConstructor()
Specified by:
getTypeConstructor in interface ClassifierDescriptor

getMemberScope

@NotNull
public MemberScope getMemberScope(@NotNull
                                          java.util.List<? extends TypeProjection> typeArguments)
Specified by:
getMemberScope in interface ClassDescriptor

getMemberScope

@NotNull
public MemberScope getMemberScope(@NotNull
                                          TypeSubstitution typeSubstitution)
Specified by:
getMemberScope in interface ClassDescriptor

getUnsubstitutedMemberScope

@NotNull
public MemberScope getUnsubstitutedMemberScope()
Specified by:
getUnsubstitutedMemberScope in interface ClassDescriptor

getStaticScope

@NotNull
public MemberScope getStaticScope()
Specified by:
getStaticScope in interface ClassDescriptor

getDefaultType

@NotNull
public KotlinType getDefaultType()
Specified by:
getDefaultType in interface ClassDescriptor
Specified by:
getDefaultType in interface ClassifierDescriptor
Returns:
type A<T> for the class A<T>

getThisAsReceiverParameter

@NotNull
public ReceiverParameterDescriptor getThisAsReceiverParameter()
Specified by:
getThisAsReceiverParameter in interface ClassDescriptor

getConstructors

@NotNull
public java.util.Collection<ConstructorDescriptor> getConstructors()
Specified by:
getConstructors in interface ClassDescriptor

getAnnotations

@NotNull
public Annotations getAnnotations()
Specified by:
getAnnotations in interface Annotated

getName

@NotNull
public Name getName()
Specified by:
getName in interface Named

getOriginal

@NotNull
public ClassDescriptor getOriginal()
Specified by:
getOriginal in interface ClassDescriptor
Specified by:
getOriginal in interface DeclarationDescriptor
Specified by:
getOriginal in interface DeclarationDescriptorWithSource
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

getContainingDeclaration

@NotNull
public DeclarationDescriptor getContainingDeclaration()
Specified by:
getContainingDeclaration in interface ClassDescriptor
Specified by:
getContainingDeclaration in interface DeclarationDescriptor
Specified by:
getContainingDeclaration in interface DeclarationDescriptorNonRoot

substitute

@NotNull
public ClassDescriptor substitute(@NotNull
                                          TypeSubstitutor substitutor)
Specified by:
substitute in interface ClassDescriptor
Specified by:
substitute in interface DeclarationDescriptor

getCompanionObjectDescriptor

public ClassDescriptor getCompanionObjectDescriptor()
Specified by:
getCompanionObjectDescriptor in interface ClassDescriptor
Returns:
nested object declared as 'companion' if one is present.

getKind

@NotNull
public ClassKind getKind()
Specified by:
getKind in interface ClassDescriptor

getModality

@NotNull
public Modality getModality()
Specified by:
getModality in interface ClassDescriptor
Specified by:
getModality in interface MemberDescriptor

getVisibility

@NotNull
public Visibility getVisibility()
Specified by:
getVisibility in interface ClassDescriptor
Specified by:
getVisibility in interface DeclarationDescriptorWithVisibility
Specified by:
getVisibility in interface MemberDescriptor

isInner

public boolean isInner()
Specified by:
isInner in interface ClassDescriptor
Returns:
true if this class contains a reference to its outer class (as opposed to static nested class)

isData

public boolean isData()
Specified by:
isData in interface ClassDescriptor

isCompanionObject

public boolean isCompanionObject()
Specified by:
isCompanionObject in interface ClassDescriptor

accept

public <R,D> R accept(DeclarationDescriptorVisitor<R,D> visitor,
                      D data)
Specified by:
accept in interface DeclarationDescriptor

acceptVoid

public void acceptVoid(DeclarationDescriptorVisitor<java.lang.Void,java.lang.Void> visitor)
Specified by:
acceptVoid in interface DeclarationDescriptor

getUnsubstitutedInnerClassesScope

@NotNull
public MemberScope getUnsubstitutedInnerClassesScope()
Specified by:
getUnsubstitutedInnerClassesScope in interface ClassDescriptor

getUnsubstitutedPrimaryConstructor

@Nullable
public ConstructorDescriptor getUnsubstitutedPrimaryConstructor()
Specified by:
getUnsubstitutedPrimaryConstructor in interface ClassDescriptor

getSource

@NotNull
public SourceElement getSource()
Specified by:
getSource in interface DeclarationDescriptorWithSource

getDeclaredTypeParameters

@NotNull
public java.util.List<TypeParameterDescriptor> getDeclaredTypeParameters()
Description copied from interface: ClassDescriptor
It may differ from 'typeConstructor.parameters' in current class is inner, 'typeConstructor.parameters' contains captured parameters from outer declaration.

Specified by:
getDeclaredTypeParameters in interface ClassDescriptor
Returns:
list of type parameters actually declared type parameters in current class