ITypeConstraint declaringTypeConstraint= SimpleTypeConstraint.createStrictSubtypeConstraint(fFactory.makeDeclaringTypeVariable(overriddingMethod), fFactory.makeDeclaringTypeVariable(overriddenMethod)); result.add(declaringTypeConstraint);
ITypeConstraint[] declaringTypeConstraint= fTypeConstraintFactory.createStrictSubtypeConstraint(fConstraintVariableFactory.makeDeclaringTypeVariable(overriddingMethod), fConstraintVariableFactory.makeDeclaringTypeVariable(overriddenMethod)); result.addAll(Arrays.asList(declaringTypeConstraint));
  private Collection getConstraintsForOverriding(IMethodBinding overriddingMethod) {	  Collection result= new ArrayList();	  Set declaringSupertypes= getDeclaringSuperTypes(overriddingMethod);	  for (Iterator iter= declaringSupertypes.iterator(); iter.hasNext();) {		  ITypeBinding superType= (ITypeBinding) iter.next();		  IMethodBinding overriddenMethod= findMethod(overriddingMethod, superType);		  Assert.isNotNull(overriddenMethod);//because we asked for declaring types		  ITypeConstraint returnTypeConstraint= SimpleTypeConstraint.createEqualsConstraint(fFactory.makeReturnTypeVariable(overriddenMethod), fFactory.makeReturnTypeVariable(overriddingMethod));		  result.add(returnTypeConstraint);		  Assert.isTrue(overriddenMethod.getParameterTypes().length == overriddingMethod.getParameterTypes().length);		  for (int i= 0, n= overriddenMethod.getParameterTypes().length; i < n; i++) {			  ITypeConstraint parameterTypeConstraint= SimpleTypeConstraint.createEqualsConstraint(fFactory.makeParameterTypeVariable(overriddenMethod, i), fFactory.makeParameterTypeVariable(overriddingMethod, i));			  result.add(parameterTypeConstraint);		  }		  ITypeConstraint declaringTypeConstraint= SimpleTypeConstraint.createStrictSubtypeConstraint(fFactory.makeDeclaringTypeVariable(overriddingMethod), fFactory.makeDeclaringTypeVariable(overriddenMethod));		  result.add(declaringTypeConstraint);	  }	  return result;  }