1 /*******************************************************************************
2 * Copyright (c) 2000, 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
12 package org.eclipse.jdt.internal.corext.refactoring.typeconstraints;
15 public interface ITypeConstraintFactory {
17 public ITypeConstraint[] createSubtypeConstraint(ConstraintVariable v1, ConstraintVariable v2);
18 public ITypeConstraint[] createEqualsConstraint(ConstraintVariable v1, ConstraintVariable v2);
19 public ITypeConstraint[] createDefinesConstraint(ConstraintVariable v1, ConstraintVariable v2);
20 public ITypeConstraint[] createStrictSubtypeConstraint(ConstraintVariable v1, ConstraintVariable v2);
22 public CompositeOrTypeConstraint createCompositeOrTypeConstraint(ITypeConstraint[] constraints);
25 * Allows for avoiding the creation of SimpleTypeConstraints based on properties of
26 * their constituent ConstraintVariables and ConstraintOperators. Can be used to e.g.
27 * avoid creation of constraints for assignments between built-in types.
32 * @return whether the constraint should <em>not</em> be created
34 public boolean filter(ConstraintVariable v1, ConstraintVariable v2, ConstraintOperator operator);