public abstract class AbstractMethodResolveConverter<ParentType extends DomElement> extends ResolvingConverter<PsiMethod>
ResolvingConverter.StringConverter, ResolvingConverter.WrappedResolvingConverter<T>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL_METHODS |
BOOLEAN_CONVERTER, EMPTY_CONVERTER
INTEGER_CONVERTER
Modifier | Constructor and Description |
---|---|
protected |
AbstractMethodResolveConverter(java.lang.Class<? extends ParentType> domMethodClass) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptMethod(PsiMethod psiMethod,
ConvertContext context) |
void |
bindReference(GenericDomValue<PsiMethod> genericValue,
ConvertContext context,
PsiElement element)
Delegate from
PsiReference.bindToElement(com.intellij.psi.PsiElement) |
static PsiMethod |
findMethod(PsiClass psiClass,
java.lang.String methodName,
AbstractMethodParams methodParameters) |
PsiMethod |
fromString(java.lang.String methodName,
ConvertContext context) |
java.util.Set<java.lang.String> |
getAdditionalVariants() |
java.lang.String |
getErrorMessage(java.lang.String s,
ConvertContext context) |
protected abstract AbstractMethodParams |
getMethodParams(ParentType parent) |
protected ParentType |
getParent(ConvertContext context) |
protected abstract java.util.Collection<PsiClass> |
getPsiClasses(ParentType parent,
ConvertContext context) |
static java.lang.String |
getReferenceCanonicalText(java.lang.String name,
AbstractMethodParams methodParams) |
java.util.Collection<? extends PsiMethod> |
getVariants(ConvertContext context) |
protected java.util.Collection<PsiMethod> |
getVariants(PsiClass s) |
boolean |
isReferenceTo(PsiElement element,
java.lang.String stringValue,
PsiMethod resolveResult,
ConvertContext context)
Delegate from
PsiReference.isReferenceTo(com.intellij.psi.PsiElement) |
static boolean |
methodParamsMatchSignature(AbstractMethodParams params,
PsiMethod psiMethod) |
static boolean |
methodSuits(PsiMethod psiMethod) |
protected void |
processMethods(ConvertContext context,
Processor<? super PsiMethod> processor,
Function<? super PsiClass,PsiMethod[]> methodGetter) |
java.lang.String |
toString(PsiMethod method,
ConvertContext context) |
canResolveTo, createLookupElement, getAdditionalVariants, getPsiElement, getQuickFixes, handleElementRename, resolve
public static final java.lang.String ALL_METHODS
protected AbstractMethodResolveConverter(java.lang.Class<? extends ParentType> domMethodClass)
protected abstract java.util.Collection<PsiClass> getPsiClasses(ParentType parent, ConvertContext context)
protected abstract AbstractMethodParams getMethodParams(ParentType parent)
public void bindReference(GenericDomValue<PsiMethod> genericValue, ConvertContext context, PsiElement element)
ResolvingConverter
PsiReference.bindToElement(com.intellij.psi.PsiElement)
bindReference
in class ResolvingConverter<PsiMethod>
genericValue
- generic valuecontext
- contextelement
- new targetpublic java.lang.String getErrorMessage(java.lang.String s, ConvertContext context)
getErrorMessage
in class ResolvingConverter<PsiMethod>
s
- string value that couldn't be resolvedcontext
- contextprotected final ParentType getParent(ConvertContext context)
public boolean isReferenceTo(PsiElement element, java.lang.String stringValue, PsiMethod resolveResult, ConvertContext context)
ResolvingConverter
PsiReference.isReferenceTo(com.intellij.psi.PsiElement)
isReferenceTo
in class ResolvingConverter<PsiMethod>
element
- elementstringValue
- string valueresolveResult
- resolve resultcontext
- contextprotected void processMethods(ConvertContext context, Processor<? super PsiMethod> processor, Function<? super PsiClass,PsiMethod[]> methodGetter)
public java.util.Collection<? extends PsiMethod> getVariants(ConvertContext context)
getVariants
in class ResolvingConverter<PsiMethod>
context
- contextprotected boolean acceptMethod(PsiMethod psiMethod, ConvertContext context)
public static boolean methodSuits(PsiMethod psiMethod)
public java.util.Set<java.lang.String> getAdditionalVariants()
getAdditionalVariants
in class ResolvingConverter<PsiMethod>
public PsiMethod fromString(java.lang.String methodName, ConvertContext context)
fromString
in class Converter<PsiMethod>
public java.lang.String toString(PsiMethod method, ConvertContext context)
public static java.lang.String getReferenceCanonicalText(java.lang.String name, AbstractMethodParams methodParams)
public static PsiMethod findMethod(PsiClass psiClass, java.lang.String methodName, AbstractMethodParams methodParameters)
public static boolean methodParamsMatchSignature(AbstractMethodParams params, PsiMethod psiMethod)