1 Debian patch touch this file
-
Fix ivy dependencies.
- Author
- Bas Couwenberg <[email protected]>
- Bug
- https://josm.openstreetmap.de/ticket/24839
- Forwarded
- not-needed
| •1 | /******************************************************************************* |
| 2 | * Copyright (c) Contributors to the Eclipse Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | * |
| 16 | * SPDX-License-Identifier: Apache-2.0 |
| 17 | *******************************************************************************/ |
| 18 | |
| 19 | package org.osgi.annotation.bundle; |
| 20 | |
| 21 | import java.lang.annotation.Documented; |
| 22 | import java.lang.annotation.ElementType; |
| 23 | import java.lang.annotation.Repeatable; |
| 24 | import java.lang.annotation.Retention; |
| 25 | import java.lang.annotation.RetentionPolicy; |
| 26 | import java.lang.annotation.Target; |
| 27 | |
| 28 | /** |
| 29 | * Define a capability for a bundle. |
| 30 | * <p> |
| 31 | * For example: |
| 32 | * |
| 33 | * <pre> |
| 34 | * @Capability(namespace=ExtenderNamespace.EXTENDER_NAMESPACE, |
| 35 | * name="osgi.component", version="1.3.0") |
| 36 | * </pre> |
| 37 | * <p> |
| 38 | * This annotation is not retained at runtime. It is for use by tools to |
| 39 | * generate bundle manifests or otherwise process the type or package. |
| 40 | * <p> |
| 41 | * This annotation can be used to annotate an annotation |
| 42 | * |
| 43 | * @author $Id: 11a1102cbf7b185c0cae0a0b34da890439d078d6 $ |
| 44 | */ |
| 45 | @Documented |
| 46 | @Retention(RetentionPolicy.CLASS) |
| 47 | @Target({ |
| 48 | ElementType.TYPE, ElementType.PACKAGE |
| 49 | }) |
| 50 | @Repeatable(Capabilities.class) |
| 51 | public @interface Capability { |
| 52 | |
| 53 | /** |
| 54 | * The namespace of this capability. |
| 55 | */ |
| 56 | String namespace(); |
| 57 | |
| 58 | /** |
| 59 | * The name of this capability within the namespace. |
| 60 | * <p> |
| 61 | * If specified, adds an attribute with the name of the namespace and the |
| 62 | * value of the specified name to the capability clause. |
| 63 | */ |
| 64 | String name() default ""; |
| 65 | |
| 66 | /** |
| 67 | * The version of this capability. |
| 68 | * <p> |
| 69 | * If specified, adds an attribute with the name and type of |
| 70 | * {@code version:Version} and the value of the specified version to the |
| 71 | * capability clause. |
| 72 | * <p> |
| 73 | * The specified version must be a valid OSGi version string. |
| 74 | */ |
| 75 | String version() default ""; |
| 76 | |
| 77 | /** |
| 78 | * A list of classes whose packages are inspected to calculate the |
| 79 | * {@code uses} directive for this capability. |
| 80 | * <p> |
| 81 | * If not specified, the {@code uses} directive is omitted from the |
| 82 | * capability clause. |
| 83 | */ |
| 84 | Class< ? >[] uses() default {}; |
| 85 | |
| 86 | /** |
| 87 | * The effective time of this capability. |
| 88 | * <p> |
| 89 | * Specifies the time the capability is available. The OSGi framework |
| 90 | * resolver only considers capabilities without an effective directive or |
| 91 | * effective:=resolve. Capabilities with other values for the effective |
| 92 | * directive can be considered by an external agent. |
| 93 | * <p> |
| 94 | * If not specified, the {@code effective} directive is omitted from the |
| 95 | * capability clause. |
| 96 | */ |
| 97 | String effective() default "resolve"; // Namespace.EFFECTIVE_RESOLVE |
| 98 | |
| 99 | /** |
| 100 | * A list of attribute or directive names and values. |
| 101 | * <p> |
| 102 | * Each string should be specified in the form: |
| 103 | * <ul> |
| 104 | * <li>{@code "name=value"} for attributes.</li> |
| 105 | * <li>{@code "name:type=value"} for typed attributes.</li> |
| 106 | * <li>{@code "name:=value"} for directives.</li> |
| 107 | * </ul> |
| 108 | * These are added, separated by semicolons, to the capability clause. |
| 109 | */ |
| 110 | String[] attribute() default {}; |
| 111 | } |