ITypeConstraint declaringTypeConstraint= SimpleTypeConstraint.createStrictSubtypeConstraint(new DeclaringTypeVariable(overriddingMethod), new DeclaringTypeVariable(overriddenMethod));
ITypeConstraint declaringTypeConstraint= SimpleTypeConstraint.createStrictSubtypeConstraint(fFactory.makeDeclaringTypeVariable(overriddingMethod), fFactory.makeDeclaringTypeVariable(overriddenMethod));
  private static 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(new ReturnTypeVariable(overriddenMethod), new ReturnTypeVariable(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(new ParameterTypeVariable(overriddenMethod, i), new ParameterTypeVariable(overriddingMethod, i));			  result.add(parameterTypeConstraint);		  }		  ITypeConstraint declaringTypeConstraint= SimpleTypeConstraint.createStrictSubtypeConstraint(new DeclaringTypeVariable(overriddingMethod), new DeclaringTypeVariable(overriddenMethod));		  result.add(declaringTypeConstraint);	  }	  return result;  }