public boolean isCompatibleWith(TypeBinding targetType, final Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; TypeBinding allocationType = this.resolvedType; if (isPolyExpression()) { TypeBinding originalExpectedType = this.typeExpected; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.typeExpected = targetType; method = inferConstructorOfElidedParameterizedType(scope); // caches result already. if (method == null || !method.isValidBinding()) return false; } allocationType = method.declaringClass; } finally { this.typeExpected = originalExpectedType; } } return allocationType != null && allocationType.isCompatibleWith(targetType, scope); }
public boolean isCompatibleWith(TypeBinding targetType, final Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; TypeBinding allocationType = this.resolvedType; if (isPolyExpression()) { TypeBinding originalExpectedType = this.typeExpected; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.typeExpected = targetType; method = inferConstructorOfElidedParameterizedType(scope); // caches result already. if (method == null || !method.isValidBinding()) return false; } allocationType = method.declaringClass; } finally { this.typeExpected = originalExpectedType; } } return allocationType != null && allocationType.isCompatibleWith(targetType, scope); }
public boolean isCompatibleWith(TypeBinding targetType, final Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; TypeBinding allocationType = this.resolvedType; if (isPolyExpression()) { TypeBinding originalExpectedType = this.typeExpected; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.typeExpected = targetType; method = inferConstructorOfElidedParameterizedType(scope); // caches result already. if (method == null || !method.isValidBinding()) return false; } allocationType = method.declaringClass; } finally { this.typeExpected = originalExpectedType; } } return allocationType != null && allocationType.isCompatibleWith(targetType, scope); }
public boolean isCompatibleWith(TypeBinding targetType, final Scope scope) { if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null) return false; TypeBinding allocationType = this.resolvedType; if (isPolyExpression()) { TypeBinding originalExpectedType = this.typeExpected; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.typeExpected = targetType; method = inferConstructorOfElidedParameterizedType(scope); // caches result already. if (method == null || !method.isValidBinding()) return false; } allocationType = method.declaringClass; } finally { this.typeExpected = originalExpectedType; } } return allocationType != null && allocationType.isCompatibleWith(targetType, scope); }
@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 allocationType = this.resolvedType; if (isPolyExpression()) { TypeBinding originalExpectedType = this.typeExpected; try { MethodBinding method = this.solutionsPerTargetType != null ? this.solutionsPerTargetType.get(targetType) : null; if (method == null) { this.typeExpected = targetType; method = inferConstructorOfElidedParameterizedType(scope); // caches result already. if (method == null || !method.isValidBinding()) return false; } allocationType = method.declaringClass; } finally { this.typeExpected = originalExpectedType; } } return allocationType != null && allocationType.isCompatibleWith(targetType, scope); }
this.binding = inferConstructorOfElidedParameterizedType(scope); if (this.binding == null || !this.binding.isValidBinding()) { scope.problemReporter().cannotInferElidedTypes(this);
this.binding = inferConstructorOfElidedParameterizedType(scope); if (this.binding == null || !this.binding.isValidBinding()) { scope.problemReporter().cannotInferElidedTypes(this);
this.binding = inferConstructorOfElidedParameterizedType(scope); if (this.binding == null || !this.binding.isValidBinding()) { scope.problemReporter().cannotInferElidedTypes(this);
this.binding = inferConstructorOfElidedParameterizedType(scope); if (this.binding == null || !this.binding.isValidBinding()) { scope.problemReporter().cannotInferElidedTypes(this);
this.binding = inferConstructorOfElidedParameterizedType(scope); if (this.binding == null || !this.binding.isValidBinding()) { scope.problemReporter().cannotInferElidedTypes(this);