org.jetbrains.jet.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.jet.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, JetJavaMirrorMarker

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

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 KotlinLightClassForPackage 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 class com.intellij.openapi.util.UserDataHolderBase
COPYABLE_USER_MAP_KEY
 
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(com.intellij.psi.PsiManager manager, KotlinLightClassForPackage delegate, JetFile file)
           
 
Method Summary
 com.intellij.psi.PsiElement copy()
           
 com.intellij.psi.PsiFile getContainingFile()
           
 com.intellij.psi.PsiClass getDelegate()
           
 FqName getFqName()
           
 com.intellij.lang.Language getLanguage()
           
 JetClassOrObject getOrigin()
           
 java.lang.String getText()
           
 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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.intellij.psi.PsiClass
findFieldByName, findInnerClassByName, findMethodBySignature, findMethodsAndTheirSubstitutorsByName, findMethodsByName, findMethodsBySignature, getAllFields, getAllInnerClasses, getAllMethods, getAllMethodsAndTheirSubstitutors, getConstructors, getContainingClass, getExtendsList, getExtendsListTypes, getFields, getImplementsList, getImplementsListTypes, getInitializers, getInnerClasses, getInterfaces, getLBrace, getMethods, getNameIdentifier, getQualifiedName, getRBrace, getScope, getSuperClass, getSupers, getSuperTypes, getVisibleSignatures, isAnnotationType, isEnum, isInheritor, isInheritorDeep, isInterface, setName
 
Methods inherited from interface com.intellij.psi.PsiNamedElement
getName
 
Methods inherited from interface com.intellij.psi.PsiDocCommentOwner
getDocComment, isDeprecated
 
Methods inherited from interface com.intellij.psi.PsiTypeParameterListOwner
getTypeParameterList, getTypeParameters, hasTypeParameters
 
Methods inherited from interface com.intellij.psi.PsiModifierListOwner
getModifierList, hasModifierProperty
 
Methods inherited from interface com.intellij.psi.PsiElement
accept, acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContext, getCopyableUserData, getFirstChild, getLastChild, getManager, getNavigationElement, getNextSibling, getNode, getOriginalElement, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getTextLength, getTextOffset, getTextRange, getUseScope, isEquivalentTo, isPhysical, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray, toString
 
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
getName, getPresentation
 
Methods inherited from interface com.intellij.pom.Navigatable
canNavigate, canNavigateToSource, navigate
 
Methods inherited from interface com.intellij.psi.PsiTarget
getNavigationElement
 
Methods inherited from interface com.intellij.pom.PomRenameableTarget
isWritable
 
Methods inherited from interface com.intellij.pom.PomNamedTarget
getName
 

Constructor Detail

FakeLightClassForFileOfPackage

public FakeLightClassForFileOfPackage(@NotNull
                                      com.intellij.psi.PsiManager manager,
                                      @NotNull
                                      KotlinLightClassForPackage delegate,
                                      @NotNull
                                      JetFile file)
Method Detail

getOrigin

@Nullable
public JetClassOrObject getOrigin()

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