org.jetbrains.kotlin.asJava
Class FakeLightClassForFileOfPackage

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.psi.impl.light.LightElement
                  extended by com.intellij.psi.impl.light.AbstractLightClass
                      extended by org.jetbrains.kotlin.asJava.FakeLightClassForFileOfPackage
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.pom.PomNamedTarget, com.intellij.pom.PomRenameableTarget<com.intellij.psi.PsiElement>, com.intellij.pom.PomTarget, com.intellij.psi.NavigatablePsiElement, com.intellij.psi.PsiClass, com.intellij.psi.PsiDocCommentOwner, com.intellij.psi.PsiElement, com.intellij.psi.PsiMember, com.intellij.psi.PsiModifierListOwner, com.intellij.psi.PsiNamedElement, com.intellij.psi.PsiNameIdentifierOwner, com.intellij.psi.PsiTarget, com.intellij.psi.PsiTypeParameterListOwner, java.lang.Cloneable, KtJavaMirrorMarker

public class FakeLightClassForFileOfPackage
extends com.intellij.psi.impl.light.AbstractLightClass
implements KtJavaMirrorMarker

This class serves as a workaround for usages of JavaElementFinder.findClasses(java.lang.String, com.intellij.psi.search.GlobalSearchScope) which eventually only need names of files containing the class. When queried for a package class (e.g. test/TestPackage), findClasses along with a KtLightClassForFacade would also return multiple instances of this class for each file present in the package. The client code can make use of every file in the package then, since getContainingFile of these instances will represent the whole package.

See LineBreakpoint#findClassCandidatesInSourceContent for the primary usage this was introduced


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
 
Field Summary
 
Fields inherited from class com.intellij.psi.impl.light.LightElement
myManager
 
Fields inherited from class com.intellij.psi.impl.ElementBase
FLAGS_LOCKED, ICON_PLACEHOLDER
 
Fields inherited from interface com.intellij.psi.PsiClass
ARRAY_FACTORY, EMPTY_ARRAY
 
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
 
Constructor Summary
FakeLightClassForFileOfPackage(KtLightClassForFacade delegate, KtFile file)
           
 
Method Summary
 com.intellij.psi.PsiElement copy()
           
 boolean equals(java.lang.Object obj)
           
 com.intellij.psi.PsiClass getClsDelegate()
           
 com.intellij.psi.PsiFile getContainingFile()
           
 com.intellij.psi.PsiClass getDelegate()
           
 FqName getFqName()
           
 KtClassOrObject getKotlinOrigin()
           
 com.intellij.lang.Language getLanguage()
           
 java.lang.String getText()
           
 int hashCode()
           
 boolean isValid()
           
 
Methods inherited from class com.intellij.psi.impl.light.AbstractLightClass
accept, findFieldByName, findInnerClassByName, findMethodBySignature, findMethodsAndTheirSubstitutorsByName, findMethodsByName, findMethodsBySignature, getAllFields, getAllInnerClasses, getAllMethods, getAllMethodsAndTheirSubstitutors, getConstructors, getContainingClass, getContext, getDocComment, getExtendsList, getExtendsListTypes, getFields, getImplementsList, getImplementsListTypes, getInitializers, getInnerClasses, getInterfaces, getLBrace, getMethods, getModifierList, getName, getNameIdentifier, getNavigationElement, getQualifiedName, getRBrace, getScope, getSuperClass, getSupers, getSuperTypes, getTypeParameterList, getTypeParameters, getVisibleSignatures, hasModifierProperty, hasTypeParameters, isAnnotationType, isDeprecated, isEnum, isEquivalentTo, isInheritor, isInheritorDeep, isInterface, processDeclarations, setName, toString
 
Methods inherited from class com.intellij.psi.impl.light.LightElement
add, addAfter, addBefore, checkAdd, checkDelete, delete, findElementAt, getChildren, getManager, getNextSibling, getNode, getParent, getPrevSibling, getStartOffsetInParent, getTextLength, getTextOffset, getTextRange, isPhysical, isWritable, replace, setNavigationElement, textMatches, textMatches, textToCharArray
 
Methods inherited from class com.intellij.psi.impl.PsiElementBase
acceptChildren, addRange, addRangeAfter, addRangeBefore, canNavigate, canNavigateToSource, deleteChildRange, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getFirstChild, getLastChild, getOriginalElement, getPresentation, getProject, getReference, getReferences, getResolveScope, getUseScope, navigate, notNullChild, textContains
 
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, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.intellij.psi.PsiElement
acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getCopyableUserData, getFirstChild, getLastChild, getManager, getNextSibling, getNode, getOriginalElement, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getTextLength, getTextOffset, getTextRange, getUseScope, isPhysical, isWritable, 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
 
Methods inherited from interface com.intellij.pom.PomRenameableTarget
isWritable
 

Constructor Detail

FakeLightClassForFileOfPackage

public FakeLightClassForFileOfPackage(@NotNull
                                      KtLightClassForFacade delegate,
                                      @NotNull
                                      KtFile file)
Method Detail

getClsDelegate

@NotNull
public com.intellij.psi.PsiClass getClsDelegate()

getKotlinOrigin

@Nullable
public KtClassOrObject getKotlinOrigin()

getContainingFile

public com.intellij.psi.PsiFile getContainingFile()
Specified by:
getContainingFile in interface com.intellij.psi.PsiElement
Overrides:
getContainingFile in class com.intellij.psi.impl.light.AbstractLightClass

isValid

public boolean isValid()
Specified by:
isValid in interface com.intellij.pom.PomTarget
Specified by:
isValid in interface com.intellij.psi.PsiElement
Overrides:
isValid in class com.intellij.psi.impl.light.AbstractLightClass

getFqName

@NotNull
public FqName getFqName()

getDelegate

@NotNull
public com.intellij.psi.PsiClass getDelegate()
Specified by:
getDelegate in class com.intellij.psi.impl.light.AbstractLightClass

copy

@NotNull
public com.intellij.psi.PsiElement copy()
Specified by:
copy in interface com.intellij.psi.PsiElement
Specified by:
copy in class com.intellij.psi.impl.light.AbstractLightClass

getText

public java.lang.String getText()
Specified by:
getText in interface com.intellij.psi.PsiElement
Overrides:
getText in class com.intellij.psi.impl.light.AbstractLightClass

getLanguage

@NotNull
public com.intellij.lang.Language getLanguage()
Specified by:
getLanguage in interface com.intellij.psi.PsiElement
Overrides:
getLanguage in class com.intellij.psi.impl.light.LightElement

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object