01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.internal.corext.refactoring.typeconstraints;
11:
12: public interface ITypeConstraintFactory {
13:
14: public ITypeConstraint[] createSubtypeConstraint(
15: ConstraintVariable v1, ConstraintVariable v2);
16:
17: public ITypeConstraint[] createEqualsConstraint(
18: ConstraintVariable v1, ConstraintVariable v2);
19:
20: public ITypeConstraint[] createDefinesConstraint(
21: ConstraintVariable v1, ConstraintVariable v2);
22:
23: public ITypeConstraint[] createStrictSubtypeConstraint(
24: ConstraintVariable v1, ConstraintVariable v2);
25:
26: public CompositeOrTypeConstraint createCompositeOrTypeConstraint(
27: ITypeConstraint[] constraints);
28:
29: /**
30: * Allows for avoiding the creation of SimpleTypeConstraints based on properties of
31: * their constituent ConstraintVariables and ConstraintOperators. Can be used to e.g.
32: * avoid creation of constraints for assignments between built-in types.
33: *
34: * @param v1
35: * @param v2
36: * @param operator
37: * @return whether the constraint should <em>not</em> be created
38: */
39: public boolean filter(ConstraintVariable v1, ConstraintVariable v2,
40: ConstraintOperator operator);
41:
42: }
|