/** * Substitute any type variables mentioned in 'type' by the corresponding inference variable, if one exists. */ public TypeBinding substitute(TypeBinding type) { InferenceSubstitution inferenceSubstitution = new InferenceSubstitution(this); return inferenceSubstitution.substitute(inferenceSubstitution, type); }
/** * Substitute any type variables mentioned in 'type' by the corresponding inference variable, if one exists. */ public TypeBinding substitute(TypeBinding type) { InferenceSubstitution inferenceSubstitution = new InferenceSubstitution(this.environment, this.inferenceVariables); return inferenceSubstitution.substitute(inferenceSubstitution, type); }
/** * Substitute any type variables mentioned in 'type' by the corresponding inference variable, if one exists. */ public TypeBinding substitute(TypeBinding type) { InferenceSubstitution inferenceSubstitution = new InferenceSubstitution(this); return inferenceSubstitution.substitute(inferenceSubstitution, type); }
/** * Substitute any type variables mentioned in 'type' by the corresponding inference variable, if one exists. */ public TypeBinding substitute(TypeBinding type) { InferenceSubstitution inferenceSubstitution = new InferenceSubstitution(this); return inferenceSubstitution.substitute(inferenceSubstitution, type); }
/** * Substitute any type variables mentioned in 'type' by the corresponding inference variable, if one exists. */ public TypeBinding substitute(TypeBinding type) { InferenceSubstitution inferenceSubstitution = new InferenceSubstitution(this); return inferenceSubstitution.substitute(inferenceSubstitution, type); }
/** * Substitute any type variables mentioned in 'type' by the corresponding inference variable, if one exists. */ public TypeBinding substitute(TypeBinding type) { InferenceSubstitution inferenceSubstitution = new InferenceSubstitution(this); return inferenceSubstitution.substitute(inferenceSubstitution, type); }
/** * Substitute any type variables mentioned in 'type' by the corresponding inference variable, if one exists. */ public TypeBinding substitute(TypeBinding type) { InferenceSubstitution inferenceSubstitution = new InferenceSubstitution(this.environment, this.inferenceVariables); return inferenceSubstitution.substitute(inferenceSubstitution, type); }
/** * Substitute any type variables mentioned in 'type' by the corresponding inference variable, if one exists. */ public TypeBinding substitute(TypeBinding type) { InferenceSubstitution inferenceSubstitution = new InferenceSubstitution(this.environment, this.inferenceVariables); return inferenceSubstitution.substitute(inferenceSubstitution, type); }
public void addBoundsFromTypeParameters(InferenceContext18 context, TypeVariableBinding[] typeParameters, InferenceVariable[] variables) { int length = typeParameters.length; for (int i = 0; i < length; i++) { TypeVariableBinding typeParameter = typeParameters[i]; InferenceVariable variable = variables[i]; TypeBound[] someBounds = typeParameter.getTypeBounds(variable, new InferenceSubstitution(context)); boolean hasProperBound = false; if (someBounds.length > 0) hasProperBound = addBounds(someBounds, context.environment); if (!hasProperBound) addBound(new TypeBound(variable, context.object, ReductionResult.SUBTYPE), context.environment); } }
private boolean addConstraintsToC(Expression[] exprs, Set<ConstraintFormula> c, MethodBinding method, int inferenceKindForMethod, boolean interleaved, InvocationSite site) throws InferenceFailureException { TypeBinding[] fs; if (exprs != null) { int k = exprs.length; int p = method.parameters.length; if (k < (method.isVarargs() ? p-1 : p)) return false; // insufficient arguments for parameters! switch (inferenceKindForMethod) { case CHECK_STRICT: case CHECK_LOOSE: fs = method.parameters; break; case CHECK_VARARG: fs = varArgTypes(method.parameters, k); break; default: throw new IllegalStateException("Unexpected checkKind "+this.inferenceKind); //$NON-NLS-1$ } for (int i = 0; i < k; i++) { TypeBinding fsi = fs[Math.min(i, p-1)]; InferenceSubstitution inferenceSubstitution = new InferenceSubstitution(this.environment, this.inferenceVariables, site); TypeBinding substF = inferenceSubstitution.substitute(inferenceSubstitution,fsi); if (!addConstraintsToC_OneExpr(exprs[i], c, fsi, substF, method, interleaved)) return false; } } return true; }
public void addBoundsFromTypeParameters(InferenceContext18 context, TypeVariableBinding[] typeParameters, InferenceVariable[] variables) { int length = typeParameters.length; for (int i = 0; i < length; i++) { TypeVariableBinding typeParameter = typeParameters[i]; InferenceVariable variable = variables[i]; TypeBound[] someBounds = typeParameter.getTypeBounds(variable, new InferenceSubstitution(context)); boolean hasProperBound = false; if (someBounds.length > 0) hasProperBound = addBounds(someBounds, context.environment); if (!hasProperBound) addBound(new TypeBound(variable, context.object, ReductionResult.SUBTYPE), context.environment); } }
InferenceSubstitution inferenceSubstitution = new InferenceSubstitution(this.environment, this.inferenceVariables, site); TypeBinding substF = inferenceSubstitution.substitute(inferenceSubstitution,fsi); if (!addConstraintsToC_OneExpr(exprs[i], c, fsi, substF, method))
public void addBoundsFromTypeParameters(InferenceContext18 context, TypeVariableBinding[] typeParameters, InferenceVariable[] variables) { int length = typeParameters.length; for (int i = 0; i < length; i++) { TypeVariableBinding typeParameter = typeParameters[i]; InferenceVariable variable = variables[i]; TypeBound[] someBounds = typeParameter.getTypeBounds(variable, new InferenceSubstitution(context)); boolean hasProperBound = false; if (someBounds.length > 0) hasProperBound = addBounds(someBounds, context.environment); if (!hasProperBound) addBound(new TypeBound(variable, context.object, ReductionResult.SUBTYPE), context.environment); } }
public void addBoundsFromTypeParameters(InferenceContext18 context, TypeVariableBinding[] typeParameters, InferenceVariable[] variables) { int length = typeParameters.length; for (int i = 0; i < length; i++) { TypeVariableBinding typeParameter = typeParameters[i]; InferenceVariable variable = variables[i]; TypeBound[] someBounds = typeParameter.getTypeBounds(variable, new InferenceSubstitution(context)); boolean hasProperBound = false; if (someBounds.length > 0) hasProperBound = addBounds(someBounds, context.environment); if (!hasProperBound) addBound(new TypeBound(variable, context.object, ReductionResult.SUBTYPE), context.environment); } }
public void addBoundsFromTypeParameters(InferenceContext18 context, TypeVariableBinding[] typeParameters, InferenceVariable[] variables) { int length = typeParameters.length; for (int i = 0; i < length; i++) { TypeVariableBinding typeParameter = typeParameters[i]; InferenceVariable variable = variables[i]; TypeBound[] someBounds = typeParameter.getTypeBounds(variable, new InferenceSubstitution(context.environment, context.inferenceVariables)); boolean hasProperBound = false; if (someBounds.length > 0) hasProperBound = addBounds(someBounds, context.environment); if (!hasProperBound) addBound(new TypeBound(variable, context.object, ReductionResult.SUBTYPE), context.environment); } }
public void addBoundsFromTypeParameters(InferenceContext18 context, TypeVariableBinding[] typeParameters, InferenceVariable[] variables) { int length = typeParameters.length; for (int i = 0; i < length; i++) { TypeVariableBinding typeParameter = typeParameters[i]; InferenceVariable variable = variables[i]; TypeBound[] someBounds = typeParameter.getTypeBounds(variable, new InferenceSubstitution(context.environment, context.inferenceVariables)); boolean hasProperBound = false; if (someBounds.length > 0) hasProperBound = addBounds(someBounds, context.environment); if (!hasProperBound) addBound(new TypeBound(variable, context.object, ReductionResult.SUBTYPE), context.environment); } }
private boolean addConstraintsToC(Expression[] exprs, Set<ConstraintFormula> c, MethodBinding method, int inferenceKindForMethod, InvocationSite site) throws InferenceFailureException { TypeBinding[] fs; if (exprs != null) { int k = exprs.length; int p = method.parameters.length; if (k < (method.isVarargs() ? p-1 : p)) return false; // insufficient arguments for parameters! switch (inferenceKindForMethod) { case CHECK_STRICT: case CHECK_LOOSE: fs = method.parameters; break; case CHECK_VARARG: fs = varArgTypes(method.parameters, k); break; default: throw new IllegalStateException("Unexpected checkKind "+this.inferenceKind); //$NON-NLS-1$ } for (int i = 0; i < k; i++) { TypeBinding fsi = fs[Math.min(i, p-1)]; InferenceSubstitution inferenceSubstitution = new InferenceSubstitution(this.environment, this.inferenceVariables, site); TypeBinding substF = inferenceSubstitution.substitute(inferenceSubstitution,fsi); if (!addConstraintsToC_OneExpr(exprs[i], c, fsi, substF, method)) return false; } } return true; }
private boolean addConstraintsToC(Expression[] exprs, Set<ConstraintFormula> c, MethodBinding method, int inferenceKindForMethod, boolean interleaved, InvocationSite site) throws InferenceFailureException { TypeBinding[] fs; if (exprs != null) { int k = exprs.length; int p = method.parameters.length; if (k < (method.isVarargs() ? p-1 : p)) return false; // insufficient arguments for parameters! switch (inferenceKindForMethod) { case CHECK_STRICT: case CHECK_LOOSE: fs = method.parameters; break; case CHECK_VARARG: fs = varArgTypes(method.parameters, k); break; default: throw new IllegalStateException("Unexpected checkKind "+this.inferenceKind); //$NON-NLS-1$ } for (int i = 0; i < k; i++) { TypeBinding fsi = fs[Math.min(i, p-1)]; InferenceSubstitution inferenceSubstitution = new InferenceSubstitution(this.environment, this.inferenceVariables, site); TypeBinding substF = inferenceSubstitution.substitute(inferenceSubstitution,fsi); if (!addConstraintsToC_OneExpr(exprs[i], c, fsi, substF, method, interleaved)) return false; } } return true; }
public void addBoundsFromTypeParameters(InferenceContext18 context, TypeVariableBinding[] typeParameters, InferenceVariable[] variables) { int length = typeParameters.length; for (int i = 0; i < length; i++) { TypeVariableBinding typeParameter = typeParameters[i]; InferenceVariable variable = variables[i]; TypeBound[] someBounds = typeParameter.getTypeBounds(variable, new InferenceSubstitution(context)); boolean hasProperBound = false; if (someBounds.length > 0) hasProperBound = addBounds(someBounds, context.environment); if (!hasProperBound) addBound(new TypeBound(variable, context.object, ReductionResult.SUBTYPE), context.environment); } }
public void addBoundsFromTypeParameters(InferenceContext18 context, TypeVariableBinding[] typeParameters, InferenceVariable[] variables) { int length = typeParameters.length; for (int i = 0; i < length; i++) { TypeVariableBinding typeParameter = typeParameters[i]; InferenceVariable variable = variables[i]; TypeBound[] someBounds = typeParameter.getTypeBounds(variable, new InferenceSubstitution(context.environment, context.inferenceVariables)); boolean hasProperBound = false; if (someBounds.length > 0) hasProperBound = addBounds(someBounds, context.environment); if (!hasProperBound) addBound(new TypeBound(variable, context.object, ReductionResult.SUBTYPE), context.environment); } }