KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > core > plugin > IMatchRules


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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 package org.eclipse.pde.core.plugin;
12
13 /**
14  * This interface contains constants used throughout the plug-in
15  * for plug-in reference matching. These rules are used to
16  * control when determining if two compared versions are
17  * equivalent.
18  */

19 public interface IMatchRules {
20     /**
21      * No rule.
22      */

23     int NONE = 0;
24
25     /**
26      * A match that is equivalent to the required version.
27      */

28     int EQUIVALENT = 1;
29
30     /**
31      * Attribute value for the 'equivalent' rule.
32      */

33     String JavaDoc RULE_EQUIVALENT = "equivalent"; //$NON-NLS-1$
34
/**
35      * A match that is compatible with the required version.
36      */

37     int COMPATIBLE = 2;
38     /**
39      * Attribute value for the 'compatible' rule.
40      */

41     String JavaDoc RULE_COMPATIBLE = "compatible"; //$NON-NLS-1$
42
/**
43      * An perfect match.
44      */

45     int PERFECT = 3;
46
47     /**
48      * Attribute value for the 'perfect' rule.
49      */

50     String JavaDoc RULE_PERFECT = "perfect"; //$NON-NLS-1$
51
/**
52      * A match requires that a version is greater or equal to the
53      * specified version.
54      */

55     int GREATER_OR_EQUAL = 4;
56     /**
57      * Attribute value for the 'greater or equal' rule
58      */

59     String JavaDoc RULE_GREATER_OR_EQUAL = "greaterOrEqual"; //$NON-NLS-1$
60
/**
61      * An id match requires that the specified id is a prefix of
62      * a candidate id.
63      */

64     int PREFIX = 5;
65     /**
66      * Attribute value for the 'prefix' id rule
67      */

68     String JavaDoc RULE_PREFIX = "prefix"; //$NON-NLS-1$
69
/**
70      * Table of rule names that match rule values defined in this
71      * interface. It can be used directly against the rule values
72      * used in plug-in models.
73      */

74     String JavaDoc[] RULE_NAME_TABLE =
75         { "", RULE_EQUIVALENT, RULE_COMPATIBLE, RULE_PERFECT, RULE_GREATER_OR_EQUAL }; //$NON-NLS-1$
76
}
77
Popular Tags