org.jetbrains.kotlin.psi
Class JetClass

java.lang.Object
  extended by com.intellij.openapi.util.UserDataHolderBase
      extended by com.intellij.psi.impl.ElementBase
          extended by com.intellij.psi.impl.PsiElementBase
              extended by com.intellij.extapi.psi.ASTDelegatePsiElement
                  extended by com.intellij.extapi.psi.StubBasedPsiElementBase<T>
                      extended by org.jetbrains.kotlin.psi.JetElementImplStub<T>
                          extended by org.jetbrains.kotlin.psi.JetModifierListOwnerStub<T>
                              extended by org.jetbrains.kotlin.psi.JetClass
All Implemented Interfaces:
com.intellij.navigation.NavigationItem, com.intellij.openapi.util.Iconable, com.intellij.openapi.util.UserDataHolder, com.intellij.openapi.util.UserDataHolderEx, com.intellij.pom.Navigatable, com.intellij.psi.NavigatablePsiElement, com.intellij.psi.PsiElement, com.intellij.psi.PsiNamedElement, com.intellij.psi.PsiNameIdentifierOwner, com.intellij.psi.StubBasedPsiElement<KotlinClassStub>, java.lang.Cloneable, JetAnnotated, JetClassOrObject, JetDeclaration, JetDeclarationContainer, JetElement, JetExpression, JetModifierListOwner, JetNamed, JetNamedDeclaration, JetStatementExpression, JetTypeParameterListOwner
Direct Known Subclasses:
JetEnumEntry

public class JetClass
extends JetModifierListOwnerStub<T>
implements JetClassOrObject


Field Summary
 
Fields inherited from class com.intellij.extapi.psi.StubBasedPsiElementBase
CREATION_TRACE, ourTraceStubAstBinding
 
Fields inherited from class com.intellij.psi.impl.ElementBase
FLAGS_LOCKED, ICON_PLACEHOLDER
 
Fields inherited from class com.intellij.openapi.util.UserDataHolderBase
COPYABLE_USER_MAP_KEY
 
Fields inherited from interface org.jetbrains.kotlin.psi.JetDeclaration
ARRAY_FACTORY, EMPTY_ARRAY
 
Fields inherited from interface com.intellij.navigation.NavigationItem
EMPTY_NAVIGATION_ITEM_ARRAY
 
Constructor Summary
JetClass(com.intellij.lang.ASTNode node)
           
JetClass(KotlinClassStub stub)
           
 
Method Summary
<R,D> R
accept(JetVisitor<R,D> visitor, D data)
           
 void addPrimaryConstructorModifier(JetModifierKeywordToken modifier)
           
 void delete()
           
 java.util.List<JetClassInitializer> getAnonymousInitializers()
           
 JetClassBody getBody()
           
 java.util.List<JetDeclaration> getDeclarations()
           
 java.util.List<JetObjectDeclaration> getDefaultObjects()
           
 JetDelegationSpecifierList getDelegationSpecifierList()
           
 java.util.List<JetDelegationSpecifier> getDelegationSpecifiers()
           
 KDoc getDocComment()
           
 FqName getFqName()
           
 java.lang.String getName()
           
 JetObjectDeclarationName getNameAsDeclaration()
           
 Name getNameAsName()
           
 Name getNameAsSafeName()
           
 com.intellij.psi.PsiElement getNameIdentifier()
           
 com.intellij.psi.PsiElement getNavigationElement()
           
 com.intellij.psi.PsiElement getParent()
           
 com.intellij.navigation.ItemPresentation getPresentation()
           
 JetModifierList getPrimaryConstructorModifierList()
           
 JetParameterList getPrimaryConstructorParameterList()
           
 java.util.List<JetParameter> getPrimaryConstructorParameters()
           
 java.util.List<JetProperty> getProperties()
           
 int getTextOffset()
           
 JetTypeConstraintList getTypeConstraintList()
           
 java.util.List<JetTypeConstraint> getTypeConstraints()
           
 JetTypeParameterList getTypeParameterList()
           
 java.util.List<JetTypeParameter> getTypeParameters()
           
 com.intellij.psi.search.SearchScope getUseScope()
           
 boolean hasPrimaryConstructor()
           
 boolean isAnnotation()
           
 boolean isEnum()
           
 boolean isEquivalentTo(com.intellij.psi.PsiElement another)
           
 boolean isInner()
           
 boolean isLocal()
           
 boolean isTopLevel()
           
 boolean isTrait()
           
 void removePrimaryConstructorModifier(JetModifierKeywordToken modifier)
           
 com.intellij.psi.PsiElement setName(java.lang.String name)
           
 
Methods inherited from class org.jetbrains.kotlin.psi.JetModifierListOwnerStub
addModifier, getAnnotationEntries, getAnnotations, getModifierList, hasModifier, removeModifier
 
Methods inherited from class org.jetbrains.kotlin.psi.JetElementImplStub
accept, acceptChildren, getContainingJetFile, getLanguage, getReference, getReferences, getStubOrPsiChildrenAsList, toString
 
Methods inherited from class com.intellij.extapi.psi.StubBasedPsiElementBase
clone, getContainingFile, getContext, getElementType, getManager, getNode, getParentByStub, getParentByTree, getProject, getRequiredStubOrPsiChild, getStub, getStubOrPsiChild, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiParent, getStubOrPsiParentOfType, isPhysical, isValid, isWritable, setNode, setStub, subtreeChanged
 
Methods inherited from class com.intellij.extapi.psi.ASTDelegatePsiElement
add, addAfter, addBefore, addInternal, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, deleteChildInternal, deleteChildRange, findChildByFilter, findChildByType, findChildByType, findChildrenByType, findChildrenByType, findChildrenByType, findChildrenByType, findElementAt, findLastChildByType, findNotNullChildByFilter, findNotNullChildByType, findNotNullChildByType, getChildren, getCopyableUserData, getFirstChild, getLastChild, getNextSibling, getPrevSibling, getStartOffsetInParent, getText, getTextLength, getTextRange, putCopyableUserData, replace, replaceChildInternal, textContains, textToCharArray
 
Methods inherited from class com.intellij.psi.impl.PsiElementBase
acceptChildren, canNavigate, canNavigateToSource, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getOriginalElement, getResolveScope, navigate, notNullChild, processDeclarations, textMatches, textMatches
 
Methods inherited from class com.intellij.psi.impl.ElementBase
buildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlags
 
Methods inherited from class com.intellij.openapi.util.UserDataHolderBase
changeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putUserData, putUserDataIfAbsent, replace, setUserMap
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jetbrains.kotlin.psi.JetClassOrObject
getModifierList, getNameAsName
 
Methods inherited from interface org.jetbrains.kotlin.psi.JetNamedDeclaration
getFqName, getNameAsSafeName
 
Methods inherited from interface org.jetbrains.kotlin.psi.JetDeclaration
getDocComment
 
Methods inherited from interface org.jetbrains.kotlin.psi.JetModifierListOwner
addModifier, hasModifier, removeModifier
 
Methods inherited from interface org.jetbrains.kotlin.psi.JetAnnotated
getAnnotationEntries, getAnnotations
 
Methods inherited from interface org.jetbrains.kotlin.psi.JetElement
acceptChildren, getContainingJetFile
 
Methods inherited from interface com.intellij.navigation.NavigationItem
getName
 
Methods inherited from interface com.intellij.pom.Navigatable
canNavigate, canNavigateToSource, navigate
 
Methods inherited from interface com.intellij.psi.PsiNameIdentifierOwner
getNameIdentifier
 
Methods inherited from interface com.intellij.psi.PsiNamedElement
getName, setName
 
Methods inherited from interface com.intellij.psi.StubBasedPsiElement
getElementType, getStub
 

Constructor Detail

JetClass

public JetClass(@NotNull
                com.intellij.lang.ASTNode node)

JetClass

public JetClass(@NotNull
                KotlinClassStub stub)
Method Detail

getDeclarations

@NotNull
public java.util.List<JetDeclaration> getDeclarations()
Specified by:
getDeclarations in interface JetDeclarationContainer

accept

public <R,D> R accept(@NotNull
                      JetVisitor<R,D> visitor,
                      D data)
Specified by:
accept in interface JetElement
Specified by:
accept in interface JetExpression
Overrides:
accept in class JetElementImplStub<KotlinClassStub>

getPrimaryConstructorParameterList

@Nullable
public JetParameterList getPrimaryConstructorParameterList()

getPrimaryConstructorParameters

@NotNull
public java.util.List<JetParameter> getPrimaryConstructorParameters()

getDelegationSpecifierList

@Nullable
public JetDelegationSpecifierList getDelegationSpecifierList()
Specified by:
getDelegationSpecifierList in interface JetClassOrObject

getDelegationSpecifiers

@NotNull
public java.util.List<JetDelegationSpecifier> getDelegationSpecifiers()
Specified by:
getDelegationSpecifiers in interface JetClassOrObject

getPrimaryConstructorModifierList

@Nullable
public JetModifierList getPrimaryConstructorModifierList()

addPrimaryConstructorModifier

public void addPrimaryConstructorModifier(@NotNull
                                          JetModifierKeywordToken modifier)

removePrimaryConstructorModifier

public void removePrimaryConstructorModifier(@NotNull
                                             JetModifierKeywordToken modifier)

getAnonymousInitializers

@NotNull
public java.util.List<JetClassInitializer> getAnonymousInitializers()
Specified by:
getAnonymousInitializers in interface JetClassOrObject

hasPrimaryConstructor

public boolean hasPrimaryConstructor()
Specified by:
hasPrimaryConstructor in interface JetClassOrObject

getNameAsDeclaration

public JetObjectDeclarationName getNameAsDeclaration()
Specified by:
getNameAsDeclaration in interface JetClassOrObject

getBody

public JetClassBody getBody()
Specified by:
getBody in interface JetClassOrObject

getProperties

public java.util.List<JetProperty> getProperties()

isTrait

public boolean isTrait()

isEnum

public boolean isEnum()

isAnnotation

public boolean isAnnotation()

isInner

public boolean isInner()

delete

public void delete()
            throws com.intellij.util.IncorrectOperationException
Specified by:
delete in interface com.intellij.psi.PsiElement
Overrides:
delete in class com.intellij.extapi.psi.ASTDelegatePsiElement
Throws:
com.intellij.util.IncorrectOperationException

isEquivalentTo

public boolean isEquivalentTo(com.intellij.psi.PsiElement another)
Specified by:
isEquivalentTo in interface com.intellij.psi.PsiElement
Overrides:
isEquivalentTo in class com.intellij.psi.impl.PsiElementBase

getPresentation

public com.intellij.navigation.ItemPresentation getPresentation()
Specified by:
getPresentation in interface com.intellij.navigation.NavigationItem
Overrides:
getPresentation in class com.intellij.psi.impl.PsiElementBase

isTopLevel

public boolean isTopLevel()
Specified by:
isTopLevel in interface JetClassOrObject

isLocal

public boolean isLocal()
Specified by:
isLocal in interface JetClassOrObject

getDefaultObjects

@NotNull
public java.util.List<JetObjectDeclaration> getDefaultObjects()

getTypeParameterList

@Nullable
public JetTypeParameterList getTypeParameterList()
Specified by:
getTypeParameterList in interface JetTypeParameterListOwner

getTypeConstraintList

@Nullable
public JetTypeConstraintList getTypeConstraintList()
Specified by:
getTypeConstraintList in interface JetTypeParameterListOwner

getTypeConstraints

@NotNull
public java.util.List<JetTypeConstraint> getTypeConstraints()
Specified by:
getTypeConstraints in interface JetTypeParameterListOwner

getTypeParameters

@NotNull
public java.util.List<JetTypeParameter> getTypeParameters()
Specified by:
getTypeParameters in interface JetTypeParameterListOwner

getName

public java.lang.String getName()
Specified by:
getName in interface com.intellij.navigation.NavigationItem
Specified by:
getName in interface com.intellij.psi.PsiNamedElement
Overrides:
getName in class com.intellij.psi.impl.PsiElementBase

getNameAsName

public Name getNameAsName()
Specified by:
getNameAsName in interface JetNamed

getNameAsSafeName

@NotNull
public Name getNameAsSafeName()
Specified by:
getNameAsSafeName in interface JetNamedDeclaration

getNameIdentifier

public com.intellij.psi.PsiElement getNameIdentifier()
Specified by:
getNameIdentifier in interface com.intellij.psi.PsiNameIdentifierOwner

setName

public com.intellij.psi.PsiElement setName(@NonNls@NotNull
                                           java.lang.String name)
                                    throws com.intellij.util.IncorrectOperationException
Specified by:
setName in interface com.intellij.psi.PsiNamedElement
Throws:
com.intellij.util.IncorrectOperationException

getTextOffset

public int getTextOffset()
Specified by:
getTextOffset in interface com.intellij.psi.PsiElement
Overrides:
getTextOffset in class com.intellij.extapi.psi.ASTDelegatePsiElement

getUseScope

@NotNull
public com.intellij.psi.search.SearchScope getUseScope()
Specified by:
getUseScope in interface com.intellij.psi.PsiElement
Overrides:
getUseScope in class com.intellij.psi.impl.PsiElementBase

getFqName

@Nullable
public FqName getFqName()
Specified by:
getFqName in interface JetNamedDeclaration

getDocComment

@Nullable
public KDoc getDocComment()
Specified by:
getDocComment in interface JetDeclaration

getParent

public com.intellij.psi.PsiElement getParent()
Specified by:
getParent in interface com.intellij.psi.PsiElement
Overrides:
getParent in class com.intellij.extapi.psi.StubBasedPsiElementBase<T extends com.intellij.psi.stubs.StubElement>

getNavigationElement

@NotNull
public com.intellij.psi.PsiElement getNavigationElement()
Specified by:
getNavigationElement in interface com.intellij.psi.PsiElement
Overrides:
getNavigationElement in class com.intellij.psi.impl.PsiElementBase