David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) OSGi Alliance (2013). All Rights Reserved. |
| 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 | |
| 17 | package org.osgi.annotation.versioning; |
| 18 | |
| 19 | import java.lang.annotation.Documented; |
| 20 | import java.lang.annotation.ElementType; |
| 21 | import java.lang.annotation.Retention; |
| 22 | import java.lang.annotation.RetentionPolicy; |
| 23 | import java.lang.annotation.Target; |
| 24 | |
| 25 | /** |
| 26 | * Specify the version of a package. |
| 27 | * |
| 28 | * <p> |
| 29 | * This annotation is not retained at runtime. It is for use by tools to |
| 30 | * generate bundle manifests or otherwise process the version of a package. |
| 31 | * |
| 32 | * @see <a href="http://www.osgi.org/wiki/uploads/Links/SemanticVersioning.pdf" |
| 33 | * >Semantic Versioning</a> |
| 34 | * @author $Id: dcb5aff364bf7d59d647211711ae0e32697cc56f $ |
| 35 | */ |
| 36 | @Documented |
| 37 | @Retention(RetentionPolicy.CLASS) |
| 38 | @Target(ElementType.PACKAGE) |
| 39 | public @interface Version { |
| 40 | /** |
| 41 | * The version of the annotated package. |
| 42 | * |
| 43 | * <p> |
| 44 | * The version must be a valid OSGi version string. |
| 45 | */ |
| 46 | String value(); |
| 47 | } |