com.intellij.psi.infos
Class CandidateInfo

java.lang.Object
  extended by com.intellij.psi.infos.CandidateInfo
All Implemented Interfaces:
JavaResolveResult, ResolveResult
Direct Known Subclasses:
ClassCandidateInfo, MethodCandidateInfo

public class CandidateInfo
extends java.lang.Object
implements JavaResolveResult


Field Summary
static CandidateInfo[] EMPTY_ARRAY
           
protected  PsiSubstitutor mySubstitutor
           
static JavaResolveResult[] RESOLVE_RESULT_FOR_PACKAGE_PREFIX_PACKAGE
           
 
Fields inherited from interface com.intellij.psi.JavaResolveResult
EMPTY
 
Constructor Summary
CandidateInfo(CandidateInfo candidate, PsiSubstitutor newSubstitutor)
           
CandidateInfo(PsiElement candidate, PsiSubstitutor substitutor)
           
CandidateInfo(PsiElement candidate, PsiSubstitutor substitutor, boolean accessProblem, boolean staticsProblem)
           
CandidateInfo(PsiElement candidate, PsiSubstitutor substitutor, boolean accessProblem, boolean staticsProblem, PsiElement currFileContext)
           
CandidateInfo(PsiElement candidate, PsiSubstitutor substitutor, PsiElement place, boolean staticsProblem)
           
CandidateInfo(PsiElement candidate, PsiSubstitutor substitutor, PsiElement place, PsiClass accessClass, boolean staticsProblem, PsiElement currFileContext)
           
 
Method Summary
static CandidateInfo createCandidateInfoForPackagePrefixPart()
           
 PsiElement getCurrentFileResolveScope()
           
 PsiElement getElement()
          Returns the result of the resolve.
 PsiSubstitutor getSubstitutor()
          Substitutor providing values of type parameters occuring in ResolveResult.getElement().
 boolean isAccessible()
          Checks whether ResolveResult.getElement() is accessible from reference.
 boolean isPackagePrefixPackageReference()
           
 boolean isStaticsScopeCorrect()
           
 boolean isValidResult()
          Checks if the reference was resolved to a valid element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_ARRAY

public static CandidateInfo[] EMPTY_ARRAY

mySubstitutor

protected final PsiSubstitutor mySubstitutor

RESOLVE_RESULT_FOR_PACKAGE_PREFIX_PACKAGE

public static final JavaResolveResult[] RESOLVE_RESULT_FOR_PACKAGE_PREFIX_PACKAGE
Constructor Detail

CandidateInfo

public CandidateInfo(PsiElement candidate,
                     PsiSubstitutor substitutor,
                     boolean accessProblem,
                     boolean staticsProblem,
                     PsiElement currFileContext)

CandidateInfo

public CandidateInfo(PsiElement candidate,
                     PsiSubstitutor substitutor,
                     boolean accessProblem,
                     boolean staticsProblem)

CandidateInfo

public CandidateInfo(PsiElement candidate,
                     PsiSubstitutor substitutor,
                     PsiElement place,
                     boolean staticsProblem)

CandidateInfo

public CandidateInfo(PsiElement candidate,
                     PsiSubstitutor substitutor,
                     PsiElement place,
                     PsiClass accessClass,
                     boolean staticsProblem,
                     PsiElement currFileContext)

CandidateInfo

public CandidateInfo(PsiElement candidate,
                     PsiSubstitutor substitutor)

CandidateInfo

public CandidateInfo(CandidateInfo candidate,
                     PsiSubstitutor newSubstitutor)
Method Detail

isValidResult

public boolean isValidResult()
Description copied from interface: ResolveResult
Checks if the reference was resolved to a valid element.

Specified by:
isValidResult in interface ResolveResult
Returns:
true if the resolve encountered no problems

isPackagePrefixPackageReference

public boolean isPackagePrefixPackageReference()
Specified by:
isPackagePrefixPackageReference in interface JavaResolveResult

getElement

public PsiElement getElement()
Description copied from interface: ResolveResult
Returns the result of the resolve.

Specified by:
getElement in interface ResolveResult
Returns:
an element the reference is resolved to.

getSubstitutor

public PsiSubstitutor getSubstitutor()
Description copied from interface: JavaResolveResult
Substitutor providing values of type parameters occuring in ResolveResult.getElement().

Specified by:
getSubstitutor in interface JavaResolveResult
Returns:

isAccessible

public boolean isAccessible()
Description copied from interface: JavaResolveResult
Checks whether ResolveResult.getElement() is accessible from reference.

Specified by:
isAccessible in interface JavaResolveResult
Returns:

isStaticsScopeCorrect

public boolean isStaticsScopeCorrect()
Specified by:
isStaticsScopeCorrect in interface JavaResolveResult

getCurrentFileResolveScope

public PsiElement getCurrentFileResolveScope()
Specified by:
getCurrentFileResolveScope in interface JavaResolveResult
Returns:
scope in the reference's file where the reference has been resolved null for qualified and local references

createCandidateInfoForPackagePrefixPart

public static CandidateInfo createCandidateInfoForPackagePrefixPart()