org.jetbrains.kotlin.psi
Class JetFile

java.lang.Object
  extended by com.intellij.openapi.util.UserDataHolderBase
      extended by com.intellij.psi.impl.ElementBase
          extended by com.intellij.psi.impl.source.PsiFileImpl
              extended by com.intellij.extapi.psi.PsiFileBase
                  extended by org.jetbrains.kotlin.psi.JetFile
All Implemented Interfaces:
com.intellij.navigation.NavigationItem, com.intellij.openapi.ui.Queryable, com.intellij.openapi.util.Iconable, com.intellij.openapi.util.UserDataHolder, com.intellij.openapi.util.UserDataHolderEx, com.intellij.pom.Navigatable, com.intellij.psi.impl.PsiFileEx, com.intellij.psi.impl.source.PsiFileWithStubSupport, com.intellij.psi.NavigatablePsiElement, com.intellij.psi.PsiCheckedRenameElement, com.intellij.psi.PsiClassOwner, com.intellij.psi.PsiElement, com.intellij.psi.PsiFile, com.intellij.psi.PsiFileSystemItem, com.intellij.psi.PsiNamedElement, java.lang.Cloneable, JetAnnotated, JetDeclarationContainer

public class JetFile
extends com.intellij.extapi.psi.PsiFileBase
implements JetDeclarationContainer, JetAnnotated, com.intellij.psi.PsiClassOwner


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.intellij.openapi.util.Iconable
com.intellij.openapi.util.Iconable.IconFlags, com.intellij.openapi.util.Iconable.LastComputedIcon
 
Nested classes/interfaces inherited from interface com.intellij.openapi.ui.Queryable
com.intellij.openapi.ui.Queryable.Contributor, com.intellij.openapi.ui.Queryable.PrintInfo, com.intellij.openapi.ui.Queryable.Util
 
Field Summary
 
Fields inherited from class com.intellij.psi.impl.source.PsiFileImpl
BUILDING_STUB, myContentElementType, myManager, myOriginalFile, STUB_PSI_MISMATCH
 
Fields inherited from class com.intellij.psi.impl.ElementBase
FLAGS_LOCKED, ICON_PLACEHOLDER
 
Fields inherited from interface com.intellij.psi.PsiFile
EMPTY_ARRAY
 
Fields inherited from interface com.intellij.psi.PsiElement
ARRAY_FACTORY
 
Fields inherited from interface com.intellij.openapi.util.Iconable
ICON_FLAG_CLOSED, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
 
Fields inherited from interface com.intellij.navigation.NavigationItem
EMPTY_NAVIGATION_ITEM_ARRAY
 
Fields inherited from interface com.intellij.psi.impl.PsiFileEx
BATCH_REFERENCE_PROCESSING
 
Constructor Summary
JetFile(com.intellij.psi.FileViewProvider viewProvider, boolean compiled)
           
 
Method Summary
<R,D> R
accept(JetVisitor<R,D> visitor, D data)
           
 void accept(com.intellij.psi.PsiElementVisitor visitor)
           
<D> void
acceptChildren(JetVisitor<java.lang.Void,D> visitor, D data)
           
<T extends JetElementImplStub<? extends com.intellij.psi.stubs.StubElement<?>>>
T
findChildByTypeOrClass(JetPlaceHolderStubElementType<T> elementType, java.lang.Class<T> elementClass)
           
 JetImportDirective findImportByAlias(java.lang.String name)
           
 java.util.List<JetAnnotationEntry> getAnnotationEntries()
           
 java.util.List<JetAnnotation> getAnnotations()
           
 com.intellij.psi.PsiClass[] getClasses()
           
 JetFile getContainingJetFile()
           
 java.util.List<JetAnnotationEntry> getDanglingAnnotations()
           
 java.util.List<JetDeclaration> getDeclarations()
           
 JetFileAnnotationList getFileAnnotationList()
           
 com.intellij.openapi.fileTypes.FileType getFileType()
           
 java.util.List<JetImportDirective> getImportDirectives()
           
 JetImportList getImportList()
           
 java.lang.String getName()
           
 com.intellij.lang.FileASTNode getNode()
           
 JetPackageDirective getPackageDirective()
           
 FqName getPackageFqName()
           
 FqName getPackageFqNameByTree()
           
 java.lang.String getPackageName()
          Deprecated. 
 JetScript getScript()
           
 KotlinFileStub getStub()
           
 boolean isCompiled()
           
 boolean isScript()
           
 boolean isScriptByTree()
           
 void setPackageName(java.lang.String packageName)
           
 java.lang.String toString()
           
 
Methods inherited from class com.intellij.extapi.psi.PsiFileBase
getLanguage, getParserDefinition
 
Methods inherited from class com.intellij.psi.impl.source.PsiFileImpl
acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, calcStubTree, calcTreeElement, canNavigate, canNavigateToSource, checkAdd, checkDelete, checkSetName, clearCaches, clone, cloneImpl, copy, createContentLeafElement, createFileElement, delete, deleteChildRange, findChildByClass, findChildrenByClass, findElementAt, findReferenceAt, findTreeForStub, getChildren, getContainingDirectory, getContainingFile, getContentElementType, getContext, getElementTypeForStubBuilder, getFirstChild, getLastChild, getManager, getModificationStamp, getNavigationElement, getNextSibling, getOriginalElement, getOriginalFile, getParent, getPresentation, getPrevSibling, getProject, getPsiRoots, getReference, getReferences, getResolveScope, getStartOffsetInParent, getStubTree, getText, getTextLength, getTextOffset, getTextRange, getTreeElement, getUseScope, getViewProvider, getVirtualFile, init, isContentsLoaded, isDirectory, isEquivalentTo, isPhysical, isTemplateDataFile, isValid, isWritable, markInvalidated, navigate, onContentReload, processChildren, processDeclarations, putInfo, putInfo, replace, reportStubAstMismatch, setContentElementType, setName, setOriginalFile, setTreeElementPointer, subtreeChanged, textContains, textMatches, textMatches, textToCharArray
 
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, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.intellij.psi.PsiFile
getContainingDirectory, getModificationStamp, getOriginalFile, getParent, getPsiRoots, getViewProvider, getVirtualFile, subtreeChanged
 
Methods inherited from interface com.intellij.psi.PsiFileSystemItem
isDirectory, processChildren
 
Methods inherited from interface com.intellij.psi.PsiCheckedRenameElement
checkSetName
 
Methods inherited from interface com.intellij.psi.PsiNamedElement
setName
 
Methods inherited from interface com.intellij.psi.PsiElement
acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getOriginalElement, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray
 
Methods inherited from interface com.intellij.openapi.util.UserDataHolder
getUserData, putUserData
 
Methods inherited from interface com.intellij.openapi.util.Iconable
getIcon
 
Methods inherited from interface com.intellij.navigation.NavigationItem
getPresentation
 
Methods inherited from interface com.intellij.pom.Navigatable
canNavigate, canNavigateToSource, navigate
 

Constructor Detail

JetFile

public JetFile(com.intellij.psi.FileViewProvider viewProvider,
               boolean compiled)
Method Detail

getNode

public com.intellij.lang.FileASTNode getNode()
Specified by:
getNode in interface com.intellij.psi.PsiElement
Specified by:
getNode in interface com.intellij.psi.PsiFile
Overrides:
getNode in class com.intellij.psi.impl.source.PsiFileImpl

isCompiled

public boolean isCompiled()

getFileType

@NotNull
public com.intellij.openapi.fileTypes.FileType getFileType()
Specified by:
getFileType in interface com.intellij.psi.PsiFile

toString

public java.lang.String toString()
Specified by:
toString in interface com.intellij.psi.PsiElement
Overrides:
toString in class com.intellij.psi.impl.source.PsiFileImpl

getDeclarations

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

getImportList

@Nullable
public JetImportList getImportList()

getFileAnnotationList

@Nullable
public JetFileAnnotationList getFileAnnotationList()

findChildByTypeOrClass

@Nullable
public <T extends JetElementImplStub<? extends com.intellij.psi.stubs.StubElement<?>>> T findChildByTypeOrClass(@NotNull
                                                                                                                         JetPlaceHolderStubElementType<T> elementType,
                                                                                                                         @NotNull
                                                                                                                         java.lang.Class<T> elementClass)

getImportDirectives

@NotNull
public java.util.List<JetImportDirective> getImportDirectives()

findImportByAlias

@Nullable
public JetImportDirective findImportByAlias(@NotNull
                                                     java.lang.String name)

getPackageDirective

@Nullable
public JetPackageDirective getPackageDirective()

getPackageName

@Deprecated
@NotNull
public java.lang.String getPackageName()
Deprecated. 

Specified by:
getPackageName in interface com.intellij.psi.PsiClassOwner

getPackageFqName

@NotNull
public FqName getPackageFqName()

getPackageFqNameByTree

@NotNull
public FqName getPackageFqNameByTree()

getStub

@Nullable
public KotlinFileStub getStub()
Overrides:
getStub in class com.intellij.psi.impl.source.PsiFileImpl

getClasses

@NotNull
public com.intellij.psi.PsiClass[] getClasses()
Specified by:
getClasses in interface com.intellij.psi.PsiClassOwner

setPackageName

public void setPackageName(java.lang.String packageName)
Specified by:
setPackageName in interface com.intellij.psi.PsiClassOwner

getScript

@Nullable
public JetScript getScript()

isScript

public boolean isScript()

isScriptByTree

public boolean isScriptByTree()

getName

@NotNull
public java.lang.String getName()
Specified by:
getName in interface com.intellij.navigation.NavigationItem
Specified by:
getName in interface com.intellij.psi.PsiFileSystemItem
Specified by:
getName in interface com.intellij.psi.PsiNamedElement
Overrides:
getName in class com.intellij.psi.impl.source.PsiFileImpl

accept

public void accept(@NotNull
                   com.intellij.psi.PsiElementVisitor visitor)
Specified by:
accept in interface com.intellij.psi.PsiElement
Overrides:
accept in class com.intellij.extapi.psi.PsiFileBase

getContainingJetFile

@NotNull
public JetFile getContainingJetFile()

acceptChildren

public <D> void acceptChildren(@NotNull
                               JetVisitor<java.lang.Void,D> visitor,
                               D data)

accept

public <R,D> R accept(@NotNull
                      JetVisitor<R,D> visitor,
                      D data)

getAnnotations

@NotNull
public java.util.List<JetAnnotation> getAnnotations()
Specified by:
getAnnotations in interface JetAnnotated

getAnnotationEntries

@NotNull
public java.util.List<JetAnnotationEntry> getAnnotationEntries()
Specified by:
getAnnotationEntries in interface JetAnnotated

getDanglingAnnotations

@NotNull
public java.util.List<JetAnnotationEntry> getDanglingAnnotations()
Returns:
annotations that do not belong to any declaration due to incomplete code or syntax errors