Search in sources :

Example 1 with PolyParameterizedGenericMethodBinding

use of org.eclipse.jdt.internal.compiler.lookup.PolyParameterizedGenericMethodBinding in project bazel-jdt-java-toolchain by salesforce.

the class MessageSend method findMethodBinding.

protected TypeBinding findMethodBinding(BlockScope scope) {
    ReferenceContext referenceContext = scope.methodScope().referenceContext;
    if (referenceContext instanceof LambdaExpression) {
        this.outerInferenceContext = ((LambdaExpression) referenceContext).inferenceContext;
    }
    if (this.expectedType != null && this.binding instanceof PolyParameterizedGenericMethodBinding) {
        this.binding = this.solutionsPerTargetType.get(this.expectedType);
    }
    if (this.binding == null) {
        // first look up or a "cache miss" somehow.
        this.binding = this.receiver.isImplicitThis() ? scope.getImplicitMethod(this.selector, this.argumentTypes, this) : scope.getMethod(this.actualReceiverType, this.selector, this.argumentTypes, this);
        if (this.binding instanceof PolyParameterizedGenericMethodBinding) {
            this.solutionsPerTargetType = new HashMap<TypeBinding, MethodBinding>();
            return new PolyTypeBinding(this);
        }
    }
    this.binding = resolvePolyExpressionArguments(this, this.binding, this.argumentTypes, scope);
    return this.binding.returnType;
}
Also used : PolyParameterizedGenericMethodBinding(org.eclipse.jdt.internal.compiler.lookup.PolyParameterizedGenericMethodBinding) SourceTypeBinding(org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding) TypeBinding(org.eclipse.jdt.internal.compiler.lookup.TypeBinding) MissingTypeBinding(org.eclipse.jdt.internal.compiler.lookup.MissingTypeBinding) PolyTypeBinding(org.eclipse.jdt.internal.compiler.lookup.PolyTypeBinding) RawTypeBinding(org.eclipse.jdt.internal.compiler.lookup.RawTypeBinding) ReferenceContext(org.eclipse.jdt.internal.compiler.impl.ReferenceContext) PolyTypeBinding(org.eclipse.jdt.internal.compiler.lookup.PolyTypeBinding) PolymorphicMethodBinding(org.eclipse.jdt.internal.compiler.lookup.PolymorphicMethodBinding) ProblemMethodBinding(org.eclipse.jdt.internal.compiler.lookup.ProblemMethodBinding) MethodBinding(org.eclipse.jdt.internal.compiler.lookup.MethodBinding) ParameterizedMethodBinding(org.eclipse.jdt.internal.compiler.lookup.ParameterizedMethodBinding) PolyParameterizedGenericMethodBinding(org.eclipse.jdt.internal.compiler.lookup.PolyParameterizedGenericMethodBinding) ParameterizedGenericMethodBinding(org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding)

Aggregations

ReferenceContext (org.eclipse.jdt.internal.compiler.impl.ReferenceContext)1 MethodBinding (org.eclipse.jdt.internal.compiler.lookup.MethodBinding)1 MissingTypeBinding (org.eclipse.jdt.internal.compiler.lookup.MissingTypeBinding)1 ParameterizedGenericMethodBinding (org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding)1 ParameterizedMethodBinding (org.eclipse.jdt.internal.compiler.lookup.ParameterizedMethodBinding)1 PolyParameterizedGenericMethodBinding (org.eclipse.jdt.internal.compiler.lookup.PolyParameterizedGenericMethodBinding)1 PolyTypeBinding (org.eclipse.jdt.internal.compiler.lookup.PolyTypeBinding)1 PolymorphicMethodBinding (org.eclipse.jdt.internal.compiler.lookup.PolymorphicMethodBinding)1 ProblemMethodBinding (org.eclipse.jdt.internal.compiler.lookup.ProblemMethodBinding)1 RawTypeBinding (org.eclipse.jdt.internal.compiler.lookup.RawTypeBinding)1 SourceTypeBinding (org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding)1 TypeBinding (org.eclipse.jdt.internal.compiler.lookup.TypeBinding)1