public boolean isCompatibleWith(TypeBinding targetType, final Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; TypeBinding originalExpectedType = this.expectedType; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.expectedType = targetType; // No need to tunnel through overload resolution. this.binding is the MSMB. method = isPolyExpression() ? ParameterizedGenericMethodBinding.computeCompatibleMethod18(this.binding.shallowOriginal(), this.argumentTypes, scope, this) : this.binding; registerResult(targetType, method); } TypeBinding returnType; if (method == null || !method.isValidBinding() || (returnType = method.returnType) == null || !returnType.isValidBinding()) return false; return returnType.capture(scope, this.sourceStart, this.sourceEnd).isCompatibleWith(targetType, scope); } finally { this.expectedType = originalExpectedType; } }
public boolean isCompatibleWith(TypeBinding targetType, final Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; TypeBinding originalExpectedType = this.expectedType; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.expectedType = targetType; // No need to tunnel through overload resolution. this.binding is the MSMB. method = isPolyExpression() ? ParameterizedGenericMethodBinding.computeCompatibleMethod18(this.binding.shallowOriginal(), this.argumentTypes, scope, this) : this.binding; registerResult(targetType, method); } TypeBinding returnType; if (method == null || !method.isValidBinding() || (returnType = method.returnType) == null || !returnType.isValidBinding()) return false; if (method == scope.environment().arrayClone) returnType = this.actualReceiverType; return returnType != null && returnType.capture(scope, this.sourceStart, this.sourceEnd).isCompatibleWith(targetType, scope); } finally { this.expectedType = originalExpectedType; } }
public boolean isCompatibleWith(TypeBinding targetType, final Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; TypeBinding originalExpectedType = this.expectedType; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.expectedType = targetType; // No need to tunnel through overload resolution. this.binding is the MSMB. method = isPolyExpression() ? ParameterizedGenericMethodBinding.computeCompatibleMethod18(this.binding.shallowOriginal(), this.argumentTypes, scope, this) : this.binding; registerResult(targetType, method); } TypeBinding returnType; if (method == null || !method.isValidBinding() || (returnType = method.returnType) == null || !returnType.isValidBinding()) return false; if (method == scope.environment().arrayClone) returnType = this.actualReceiverType; return returnType != null && returnType.capture(scope, this.sourceStart, this.sourceEnd).isCompatibleWith(targetType, scope); } finally { this.expectedType = originalExpectedType; } }
public boolean isBoxingCompatibleWith(TypeBinding targetType, Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; if (isPolyExpression() && !targetType.isPrimitiveOrBoxedPrimitiveType()) // i.e it is dumb to trigger inference, checking boxing compatibility against say Collector<? super T, A, R>. return false; TypeBinding originalExpectedType = this.expectedType; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.expectedType = targetType; // No need to tunnel through overload resolution. this.binding is the MSMB. method = isPolyExpression() ? ParameterizedGenericMethodBinding.computeCompatibleMethod18(this.binding.shallowOriginal(), this.argumentTypes, scope, this) : this.binding; registerResult(targetType, method); } if (method == null || !method.isValidBinding() || method.returnType == null || !method.returnType.isValidBinding()) return false; return super.isBoxingCompatible(method.returnType.capture(scope, this.sourceStart, this.sourceEnd), targetType, this, scope); } finally { this.expectedType = originalExpectedType; } }
public boolean isBoxingCompatibleWith(TypeBinding targetType, Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; if (isPolyExpression() && !targetType.isPrimitiveOrBoxedPrimitiveType()) // i.e it is dumb to trigger inference, checking boxing compatibility against say Collector<? super T, A, R>. return false; TypeBinding originalExpectedType = this.expectedType; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.expectedType = targetType; // No need to tunnel through overload resolution. this.binding is the MSMB. method = isPolyExpression() ? ParameterizedGenericMethodBinding.computeCompatibleMethod18(this.binding.shallowOriginal(), this.argumentTypes, scope, this) : this.binding; registerResult(targetType, method); } if (method == null || !method.isValidBinding() || method.returnType == null || !method.returnType.isValidBinding()) return false; return super.isBoxingCompatible(method.returnType.capture(scope, this.sourceStart, this.sourceEnd), targetType, this, scope); } finally { this.expectedType = originalExpectedType; } }
public boolean isCompatibleWith(TypeBinding targetType, final Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; TypeBinding originalExpectedType = this.expectedType; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.expectedType = targetType; // No need to tunnel through overload resolution. this.binding is the MSMB. method = isPolyExpression() ? ParameterizedGenericMethodBinding.computeCompatibleMethod18(this.binding.shallowOriginal(), this.argumentTypes, scope, this) : this.binding; registerResult(targetType, method); } TypeBinding returnType; if (method == null || !method.isValidBinding() || (returnType = method.returnType) == null || !returnType.isValidBinding()) return false; if (method == scope.environment().arrayClone) returnType = this.actualReceiverType; return returnType != null && returnType.capture(scope, this.sourceStart, this.sourceEnd).isCompatibleWith(targetType, scope); } finally { this.expectedType = originalExpectedType; } }
@Override public boolean isBoxingCompatibleWith(TypeBinding targetType, Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; if (isPolyExpression() && !targetType.isPrimitiveOrBoxedPrimitiveType()) // i.e it is dumb to trigger inference, checking boxing compatibility against say Collector<? super T, A, R>. return false; TypeBinding originalExpectedType = this.expectedType; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.expectedType = targetType; // No need to tunnel through overload resolution. this.binding is the MSMB. method = isPolyExpression() ? ParameterizedGenericMethodBinding.computeCompatibleMethod18(this.binding.shallowOriginal(), this.argumentTypes, scope, this) : this.binding; registerResult(targetType, method); } if (method == null || !method.isValidBinding() || method.returnType == null || !method.returnType.isValidBinding()) return false; return super.isBoxingCompatible(method.returnType.capture(scope, this.sourceStart, this.sourceEnd), targetType, this, scope); } finally { this.expectedType = originalExpectedType; } }
public boolean isBoxingCompatibleWith(TypeBinding targetType, Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; if (isPolyExpression() && !targetType.isPrimitiveOrBoxedPrimitiveType()) // i.e it is dumb to trigger inference, checking boxing compatibility against say Collector<? super T, A, R>. return false; TypeBinding originalExpectedType = this.expectedType; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.expectedType = targetType; // No need to tunnel through overload resolution. this.binding is the MSMB. method = isPolyExpression() ? ParameterizedGenericMethodBinding.computeCompatibleMethod18(this.binding.shallowOriginal(), this.argumentTypes, scope, this) : this.binding; registerResult(targetType, method); } if (method == null || !method.isValidBinding() || method.returnType == null || !method.returnType.isValidBinding()) return false; return super.isBoxingCompatible(method.returnType.capture(scope, this.sourceStart, this.sourceEnd), targetType, this, scope); } finally { this.expectedType = originalExpectedType; } }
public boolean isBoxingCompatibleWith(TypeBinding targetType, Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; if (isPolyExpression() && !targetType.isPrimitiveOrBoxedPrimitiveType()) // i.e it is dumb to trigger inference, checking boxing compatibility against say Collector<? super T, A, R>. return false; TypeBinding originalExpectedType = this.expectedType; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.expectedType = targetType; // No need to tunnel through overload resolution. this.binding is the MSMB. method = isPolyExpression() ? ParameterizedGenericMethodBinding.computeCompatibleMethod18(this.binding.shallowOriginal(), this.argumentTypes, scope, this) : this.binding; registerResult(targetType, method); } if (method == null || !method.isValidBinding() || method.returnType == null || !method.returnType.isValidBinding()) return false; return super.isBoxingCompatible(method.returnType.capture(scope, this.sourceStart, this.sourceEnd), targetType, this, scope); } finally { this.expectedType = originalExpectedType; } }
@Override public boolean isCompatibleWith(TypeBinding targetType, final Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; TypeBinding originalExpectedType = this.expectedType; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.expectedType = targetType; // No need to tunnel through overload resolution. this.binding is the MSMB. method = isPolyExpression() ? ParameterizedGenericMethodBinding.computeCompatibleMethod18(this.binding.shallowOriginal(), this.argumentTypes, scope, this) : this.binding; registerResult(targetType, method); } TypeBinding returnType; if (method == null || !method.isValidBinding() || (returnType = method.returnType) == null || !returnType.isValidBinding()) return false; if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) returnType = scope.environment().convertToRawType(returnType.erasure(), true); return returnType.capture(scope, this.sourceStart, this.sourceEnd).isCompatibleWith(targetType, scope); } finally { this.expectedType = originalExpectedType; } }