public interface PsiResolveHelper
JavaPsiFacade.getResolveHelper()
Modifier and Type | Interface and Description |
---|---|
static class |
PsiResolveHelper.SERVICE |
Modifier and Type | Field and Description |
---|---|
static RecursionGuard<PsiElement> |
ourGraphGuard |
static RecursionGuard<PsiExpression> |
ourGuard |
Modifier and Type | Method and Description |
---|---|
LanguageLevel |
getEffectiveLanguageLevel(VirtualFile virtualFile) |
CandidateInfo [] |
getReferencedMethodCandidates(PsiCallExpression call,
boolean dummyImplicitConstructor)
Resolves a call expression and returns an array of possible resolve results.
|
CandidateInfo [] |
getReferencedMethodCandidates(PsiCallExpression call,
boolean dummyImplicitConstructor,
boolean checkVarargs)
Resolves a call expression and returns an array of possible resolve results.
|
PsiType |
getSubstitutionForTypeParameter(PsiTypeParameter typeParam,
PsiType param,
PsiType arg,
boolean isContraVariantPosition,
LanguageLevel languageLevel) |
boolean |
hasOverloads(PsiCallExpression call)
Checks if there are method (or constructor) overloads.
|
PsiSubstitutor |
inferTypeArguments(PsiTypeParameter [] typeParameters,
PsiParameter [] parameters,
PsiExpression [] arguments,
MethodCandidateInfo info,
PsiElement parent,
ParameterTypeInferencePolicy policy,
LanguageLevel languageLevel) |
PsiSubstitutor |
inferTypeArguments(PsiTypeParameter [] typeParameters,
PsiParameter [] parameters,
PsiExpression [] arguments,
PsiSubstitutor partialSubstitutor,
PsiElement parent,
ParameterTypeInferencePolicy policy) |
PsiSubstitutor |
inferTypeArguments(PsiTypeParameter [] typeParameters,
PsiType [] leftTypes,
PsiType [] rightTypes,
LanguageLevel languageLevel) |
default PsiSubstitutor |
inferTypeArguments(PsiTypeParameter [] typeParameters,
PsiType [] leftTypes,
PsiType [] rightTypes,
PsiSubstitutor partialSubstitutor,
LanguageLevel languageLevel) |
PsiType |
inferTypeForMethodTypeParameter(PsiTypeParameter typeParameter,
PsiParameter [] parameters,
PsiExpression [] arguments,
PsiSubstitutor partialSubstitutor,
PsiElement parent,
ParameterTypeInferencePolicy policy)
Returns
PsiType.NULL iff no type could be inferred, null iff the type inferred is raw, the inferred type otherwise. |
boolean |
isAccessible(PsiMember member,
PsiElement place,
PsiClass accessObjectClass)
Returns
true if a member is accessible from a given place according to JLS 6.6 "Access Control". |
boolean |
isAccessible(PsiMember member,
PsiModifierList modifierList,
PsiElement place,
PsiClass accessObjectClass,
PsiElement currentFileResolveScope)
Returns
true if a member is accessible from a given place according to JLS 6.6 "Access Control". |
boolean |
isAccessible(PsiPackage pkg,
PsiElement place)
Returns
true if a package is accessible from a given place according to JLS 6.6 "Access Control". |
JavaResolveResult [] |
multiResolveConstructor(PsiClassType type,
PsiExpressionList argumentList,
PsiElement place)
Resolves a constructor and returns all variants for the resolve.
|
PsiVariable |
resolveAccessibleReferencedVariable(java.lang.String referenceText,
PsiElement context)
Resolves a reference to a variable, given the text of the reference and the context
in which it was encountered.
|
JavaResolveResult |
resolveConstructor(PsiClassType type,
PsiExpressionList argumentList,
PsiElement place)
Resolves a constructor.
|
PsiClass |
resolveReferencedClass(java.lang.String referenceText,
PsiElement context)
Resolves a reference to a class, given the text of the reference and the context
in which it was encountered.
|
PsiVariable |
resolveReferencedVariable(java.lang.String referenceText,
PsiElement context)
Resolves a reference to a variable, given the text of the reference and the context
in which it was encountered.
|
static final RecursionGuard<PsiExpression> ourGuard
static final RecursionGuard<PsiElement> ourGraphGuard
JavaResolveResult resolveConstructor(PsiClassType type, PsiExpressionList argumentList, PsiElement place)
type
- the class containing the constructorargumentList
- list of arguments of the call or new expressionplace
- place where constructor is invoked (used for checking access)JavaResolveResult.EMPTY
if the resolve failed.JavaResolveResult [] multiResolveConstructor(PsiClassType type, PsiExpressionList argumentList, PsiElement place)
type
- the class containing the constructorargumentList
- list of arguments of the call or new expressionplace
- place where constructor is invoked (used for checking access)JavaResolveResult.EMPTY
if the resolve failed.CandidateInfo [] getReferencedMethodCandidates(PsiCallExpression call, boolean dummyImplicitConstructor)
call
- the call expression to resolve.dummyImplicitConstructor
- if true, implicit empty constructor which does not actually exist
can be returned as a candidate for the resolve.CandidateInfo [] getReferencedMethodCandidates(PsiCallExpression call, boolean dummyImplicitConstructor, boolean checkVarargs)
call
- the call expression to resolve.dummyImplicitConstructor
- if true, implicit empty constructor which does not actually exist
can be returned as a candidate for the resolve.checkVarargs
- true if varargs method should lead to 2 candidates in the result arrayboolean hasOverloads(PsiCallExpression call)
PsiClass resolveReferencedClass(java.lang.String referenceText, PsiElement context)
referenceText
- the text of the reference.context
- the context in which the reference is found.PsiVariable resolveReferencedVariable(java.lang.String referenceText, PsiElement context)
referenceText
- the text of the reference.context
- the context in which the reference is found.PsiVariable resolveAccessibleReferencedVariable(java.lang.String referenceText, PsiElement context)
referenceText
- the text of the reference.context
- the context in which the reference is found.boolean isAccessible(PsiMember member, PsiModifierList modifierList, PsiElement place, PsiClass accessObjectClass, PsiElement currentFileResolveScope)
true
if a member is accessible from a given place according to JLS 6.6 "Access Control".boolean isAccessible(PsiMember member, PsiElement place, PsiClass accessObjectClass)
true
if a member is accessible from a given place according to JLS 6.6 "Access Control".boolean isAccessible(PsiPackage pkg, PsiElement place)
true
if a package is accessible from a given place according to JLS 6.6 "Access Control".PsiType inferTypeForMethodTypeParameter(PsiTypeParameter typeParameter, PsiParameter [] parameters, PsiExpression [] arguments, PsiSubstitutor partialSubstitutor, PsiElement parent, ParameterTypeInferencePolicy policy)
PsiType.NULL
iff no type could be inferred, null
iff the type inferred is raw, the inferred type otherwise.PsiSubstitutor inferTypeArguments(PsiTypeParameter [] typeParameters, PsiParameter [] parameters, PsiExpression [] arguments, PsiSubstitutor partialSubstitutor, PsiElement parent, ParameterTypeInferencePolicy policy)
PsiSubstitutor inferTypeArguments(PsiTypeParameter [] typeParameters, PsiParameter [] parameters, PsiExpression [] arguments, MethodCandidateInfo info, PsiElement parent, ParameterTypeInferencePolicy policy, LanguageLevel languageLevel)
PsiSubstitutor inferTypeArguments(PsiTypeParameter [] typeParameters, PsiType [] leftTypes, PsiType [] rightTypes, LanguageLevel languageLevel)
default PsiSubstitutor inferTypeArguments(PsiTypeParameter [] typeParameters, PsiType [] leftTypes, PsiType [] rightTypes, PsiSubstitutor partialSubstitutor, LanguageLevel languageLevel)
PsiType getSubstitutionForTypeParameter(PsiTypeParameter typeParam, PsiType param, PsiType arg, boolean isContraVariantPosition, LanguageLevel languageLevel)
LanguageLevel getEffectiveLanguageLevel(VirtualFile virtualFile)