KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > service > resolver > GenericSpecification


1 /*******************************************************************************
2  * Copyright (c) 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.osgi.service.resolver;
12
13 /**
14  * A specification which depends on a generic capability
15  * @since 3.2
16  */

17 public interface GenericSpecification extends VersionConstraint {
18     /**
19      * The optional resolution type
20      * @see #getResolution()
21      */

22     public static final int RESOLUTION_OPTIONAL = 0x01;
23     /**
24      * The multiple resolution type
25      * @see #getResolution()
26      */

27     public static final int RESOLUTION_MULTIPLE = 0x02;
28
29     /**
30      * Returns a matching filter used to match with a suppliers attributes
31      * @return a matching filter used to match with a suppliers attributes
32      */

33     public String JavaDoc getMatchingFilter();
34
35     /**
36      * Returns the type of generic specification
37      * @return the type of generic specification
38      */

39     public String JavaDoc getType();
40
41     /**
42      * Returns the resolution type of the required capability. The returned
43      * value is a bit mask that may have the optional bit {@link #RESOLUTION_OPTIONAL}
44      * and/or the multiple bit {@link #RESOLUTION_MULTIPLE} set.
45      *
46      * @return the resolution type of the required capability
47      */

48     public int getResolution();
49
50     /**
51      * Returns the suppliers of the capability. If the the resolution is multiple then
52      * more than one supplier may be returned
53      * @return the suppliers of the capability
54      */

55     public GenericDescription[] getSuppliers();
56 }
57
Popular Tags