[groovy] rename _inferer_ to _computer_

This commit is contained in:
Daniil Ovchinnikov
2015-12-10 18:48:58 +03:00
parent df72b285fc
commit 8d9d92b899
2 changed files with 8 additions and 8 deletions
@@ -25,7 +25,7 @@ import org.jetbrains.plugins.groovy.lang.psi.api.SpreadState;
public class GroovyMethodResult extends GroovyResolveResultImpl {
private final NotNullLazyValue<PsiSubstitutor> mySubstitutorInferer;
private final NotNullLazyValue<PsiSubstitutor> mySubstitutorComputer;
public GroovyMethodResult(@NotNull PsiMethod method,
@Nullable PsiElement resolveContext,
@@ -33,17 +33,17 @@ public class GroovyMethodResult extends GroovyResolveResultImpl {
@NotNull PsiSubstitutor substitutor,
boolean isAccessible, boolean staticsOK) {
super(method, resolveContext, spreadState, substitutor, isAccessible, staticsOK, true, true);
mySubstitutorInferer = NotNullLazyValue.createConstantValue(substitutor);
mySubstitutorComputer = NotNullLazyValue.createConstantValue(substitutor);
}
public GroovyMethodResult(@NotNull PsiMethod element,
@Nullable PsiElement resolveContext,
@Nullable SpreadState spreadState,
@NotNull PsiSubstitutor partialSubstitutor,
@NotNull NotNullLazyValue<PsiSubstitutor> substitutorInferer,
@NotNull NotNullLazyValue<PsiSubstitutor> substitutorComputer,
boolean isAccessible, boolean staticsOK, boolean isApplicable) {
super(element, resolveContext, spreadState, partialSubstitutor, isAccessible, staticsOK, false, isApplicable);
mySubstitutorInferer = substitutorInferer;
mySubstitutorComputer = substitutorComputer;
}
@NotNull
@@ -55,11 +55,11 @@ public class GroovyMethodResult extends GroovyResolveResultImpl {
@NotNull
@Override
public PsiSubstitutor getSubstitutor() {
return mySubstitutorInferer.getValue();
return mySubstitutorComputer.getValue();
}
@NotNull
public PsiSubstitutor getSubstitutor(boolean infer) {
return infer ? mySubstitutorInferer.getValue() : super.getSubstitutor();
return infer ? mySubstitutorComputer.getValue() : super.getSubstitutor();
}
}
@@ -108,7 +108,7 @@ public class MethodResolverProcessor extends ResolverProcessor<GroovyMethodResul
final PsiElement resolveContext = state.get(RESOLVE_CONTEXT);
final SpreadState spreadState = state.get(SpreadState.SPREAD_STATE);
final PsiSubstitutor partialSubstitutor = getSubstitutor(state);
final NotNullLazyValue<PsiSubstitutor> substitutorInferer
final NotNullLazyValue<PsiSubstitutor> substitutorComputer
= myByShape ? NotNullLazyValue.createConstantValue(partialSubstitutor) : new NotNullLazyValue<PsiSubstitutor>() {
@NotNull
@Override
@@ -123,7 +123,7 @@ public class MethodResolverProcessor extends ResolverProcessor<GroovyMethodResul
boolean isValidResult = isStaticsOK && isAccessible && isApplicable;
GroovyMethodResult candidate = new GroovyMethodResult(
method, resolveContext, spreadState, partialSubstitutor, substitutorInferer, isAccessible, isStaticsOK, isValidResult
method, resolveContext, spreadState, partialSubstitutor, substitutorComputer, isAccessible, isStaticsOK, isValidResult
);
if (!myAllVariants && isValidResult) {