org.jetbrains.kotlin.descriptors
Interface ClassDescriptor

All Superinterfaces:
ClassifierDescriptor, ClassifierDescriptorWithTypeParameters, ClassOrPackageFragmentDescriptor, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, DeclarationDescriptorWithVisibility, MemberDescriptor, Named
All Known Subinterfaces:
ClassDescriptorWithResolutionScopes, JavaClassDescriptor, ScriptDescriptor
All Known Implementing Classes:
AbstractClassDescriptor, ClassDescriptorBase, ClassDescriptorImpl, EnumEntrySyntheticClassDescriptor, LazyClassDescriptor, LazySubstitutingClassDescriptor, MutableClassDescriptor

public interface ClassDescriptor
extends ClassifierDescriptorWithTypeParameters, ClassOrPackageFragmentDescriptor


Method Summary
 ClassDescriptor getCompanionObjectDescriptor()
           
 java.util.Collection<ClassConstructorDescriptor> 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.
 SimpleType getDefaultType()
           
 ClassKind getKind()
           
 MemberScope getMemberScope(java.util.List<? extends TypeProjection> typeArguments)
           
 MemberScope getMemberScope(TypeSubstitution typeSubstitution)
           
 Modality getModality()
           
 ClassDescriptor getOriginal()
           
 java.util.Collection<ClassDescriptor> getSealedSubclasses()
           
 MemberScope getStaticScope()
           
 ReceiverParameterDescriptor getThisAsReceiverParameter()
           
 MemberScope getUnsubstitutedInnerClassesScope()
           
 MemberScope getUnsubstitutedMemberScope()
           
 ClassConstructorDescriptor getUnsubstitutedPrimaryConstructor()
           
 Visibility getVisibility()
           
 boolean isCompanionObject()
           
 boolean isData()
           
 ClassDescriptor substitute(TypeSubstitutor substitutor)
           
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.ClassifierDescriptorWithTypeParameters
isInner
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.ClassifierDescriptor
getTypeConstructor
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.MemberDescriptor
isExternal, isHeader, isImpl
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptorWithSource
getSource
 

Method Detail

getMemberScope

@NotNull
MemberScope getMemberScope(@NotNull
                                   java.util.List<? extends TypeProjection> typeArguments)

getMemberScope

@NotNull
MemberScope getMemberScope(@NotNull
                                   TypeSubstitution typeSubstitution)

getUnsubstitutedMemberScope

@NotNull
MemberScope getUnsubstitutedMemberScope()

getUnsubstitutedInnerClassesScope

@NotNull
MemberScope getUnsubstitutedInnerClassesScope()

getStaticScope

@NotNull
MemberScope getStaticScope()

getConstructors

@NotNull
@ReadOnly
java.util.Collection<ClassConstructorDescriptor> getConstructors()

getContainingDeclaration

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

getDefaultType

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

substitute

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

getCompanionObjectDescriptor

@Nullable
ClassDescriptor getCompanionObjectDescriptor()
Returns:
nested object declared as 'companion' if one is present.

getKind

@NotNull
ClassKind getKind()

getModality

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

getVisibility

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

isCompanionObject

boolean isCompanionObject()

isData

boolean isData()

getThisAsReceiverParameter

@NotNull
ReceiverParameterDescriptor getThisAsReceiverParameter()

getUnsubstitutedPrimaryConstructor

@Nullable
ClassConstructorDescriptor getUnsubstitutedPrimaryConstructor()

getDeclaredTypeParameters

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

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

getSealedSubclasses

@ReadOnly
@NotNull
java.util.Collection<ClassDescriptor> getSealedSubclasses()
Returns:
direct subclasses of this class if it's a sealed class, empty list otherwise

getOriginal

@NotNull
ClassDescriptor getOriginal()
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