KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > corext > refactoring > typeconstraints > ITypeConstraintFactory


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.jdt.internal.corext.refactoring.typeconstraints;
13
14
15 public interface ITypeConstraintFactory {
16     
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);
21     
22     public CompositeOrTypeConstraint createCompositeOrTypeConstraint(ITypeConstraint[] constraints);
23     
24     /**
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.
28      *
29      * @param v1
30      * @param v2
31      * @param operator
32      * @return whether the constraint should <em>not</em> be created
33      */

34     public boolean filter(ConstraintVariable v1, ConstraintVariable v2, ConstraintOperator operator);
35     
36 }
37
Popular Tags