org.jetbrains.kotlin.descriptors.impl
Class MutableClassDescriptor

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

public class MutableClassDescriptor
extends ClassDescriptorBase


Field Summary
 
Fields inherited from class org.jetbrains.kotlin.descriptors.impl.AbstractClassDescriptor
defaultType
 
Constructor Summary
MutableClassDescriptor(DeclarationDescriptor containingDeclaration, ClassKind kind, boolean isInner, boolean isExternal, Name name, SourceElement source)
           
 
Method Summary
 void addSupertype(KotlinType supertype)
           
 void createTypeConstructor()
           
 Annotations getAnnotations()
           
 ClassDescriptor getCompanionObjectDescriptor()
           
 java.util.Set<ClassConstructorDescriptor> getConstructors()
           
 java.util.List<TypeParameterDescriptor> getDeclaredTypeParameters()
          It may differ from 'typeConstructor.parameters' in current class is inner, 'typeConstructor.parameters' contains captured parameters from outer declaration.
 ClassKind getKind()
           
 Modality getModality()
           
 java.util.Collection<ClassDescriptor> getSealedSubclasses()
           
 MemberScope getStaticScope()
           
 TypeConstructor getTypeConstructor()
           
 MemberScope getUnsubstitutedMemberScope()
           
 ClassConstructorDescriptor getUnsubstitutedPrimaryConstructor()
           
 Visibility getVisibility()
           
 boolean isCompanionObject()
           
 boolean isData()
           
 boolean isHeader()
           
 boolean isImpl()
           
 boolean isInner()
           
 void setModality(Modality modality)
           
 void setTypeParameterDescriptors(java.util.List<TypeParameterDescriptor> typeParameters)
           
 void setVisibility(Visibility visibility)
           
 java.lang.String toString()
           
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.ClassDescriptorBase
getContainingDeclaration, getSource, isExternal
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.AbstractClassDescriptor
accept, acceptVoid, getDefaultType, getMemberScope, getMemberScope, getName, getOriginal, getThisAsReceiverParameter, getUnsubstitutedInnerClassesScope, substitute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MutableClassDescriptor

public MutableClassDescriptor(@NotNull
                              DeclarationDescriptor containingDeclaration,
                              @NotNull
                              ClassKind kind,
                              boolean isInner,
                              boolean isExternal,
                              @NotNull
                              Name name,
                              @NotNull
                              SourceElement source)
Method Detail

getCompanionObjectDescriptor

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

getAnnotations

@NotNull
public Annotations getAnnotations()

setModality

public void setModality(@NotNull
                        Modality modality)

getModality

@NotNull
public Modality getModality()

getKind

@NotNull
public ClassKind getKind()

setVisibility

public void setVisibility(@NotNull
                          Visibility visibility)

getVisibility

@NotNull
public Visibility getVisibility()

isInner

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

isData

public boolean isData()

isCompanionObject

public boolean isCompanionObject()

isHeader

public boolean isHeader()

isImpl

public boolean isImpl()

getTypeConstructor

@NotNull
public TypeConstructor getTypeConstructor()

addSupertype

public void addSupertype(@NotNull
                         KotlinType supertype)

getConstructors

@NotNull
public java.util.Set<ClassConstructorDescriptor> getConstructors()

getUnsubstitutedPrimaryConstructor

@Nullable
public ClassConstructorDescriptor getUnsubstitutedPrimaryConstructor()

setTypeParameterDescriptors

public void setTypeParameterDescriptors(@NotNull
                                        java.util.List<TypeParameterDescriptor> typeParameters)

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.

Returns:
list of type parameters actually declared type parameters in current class

createTypeConstructor

public void createTypeConstructor()

getUnsubstitutedMemberScope

@NotNull
public MemberScope getUnsubstitutedMemberScope()

getStaticScope

@NotNull
public MemberScope getStaticScope()

getSealedSubclasses

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object