org.jetbrains.kotlin.descriptors.impl
Class LazySubstitutingClassDescriptor
java.lang.Object
org.jetbrains.kotlin.descriptors.impl.LazySubstitutingClassDescriptor
- All Implemented Interfaces:
- ClassDescriptor, ClassifierDescriptor, ClassifierDescriptorWithTypeParameters, ClassOrPackageFragmentDescriptor, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, DeclarationDescriptorWithVisibility, MemberDescriptor, Named
public class LazySubstitutingClassDescriptor
- extends java.lang.Object
- implements ClassDescriptor
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LazySubstitutingClassDescriptor
public LazySubstitutingClassDescriptor(ClassDescriptor descriptor,
TypeSubstitutor substitutor)
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 SimpleType 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<ClassConstructorDescriptor> getConstructors()
- Specified by:
getConstructors in interface ClassDescriptor
getAnnotations
@NotNull
public Annotations getAnnotations()
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 ClassifierDescriptor- 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 ClassifierDescriptorWithTypeParameters
- 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
isExternal
public boolean isExternal()
- Specified by:
isExternal in interface MemberDescriptor
isCompanionObject
public boolean isCompanionObject()
- Specified by:
isCompanionObject in interface ClassDescriptor
isHeader
public boolean isHeader()
- Specified by:
isHeader in interface MemberDescriptor
isImpl
public boolean isImpl()
- Specified by:
isImpl in interface MemberDescriptor
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 ClassConstructorDescriptor 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- Specified by:
getDeclaredTypeParameters in interface ClassifierDescriptorWithTypeParameters
- Returns:
- list of type parameters actually declared type parameters in current class
getSealedSubclasses
@NotNull
public java.util.Collection<ClassDescriptor> getSealedSubclasses()
- Specified by:
getSealedSubclasses in interface ClassDescriptor
- Returns:
- direct subclasses of this class if it's a sealed class, empty list otherwise