Skip to content

Commit

Permalink
annotations: Allow @ProviderType to be applied to package-info.java
Browse files Browse the repository at this point in the history
  • Loading branch information
bjhargrave committed May 27, 2016
1 parent 7fe37d4 commit 9461b12
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
Expand Up @@ -35,6 +35,10 @@
* both. A type is assumed to be {@link ConsumerType} if it is not marked either
* {@link ConsumerType} or {@link ProviderType}.
* <p>
* A package can be marked {@link ProviderType}. In this case, all types in the
* package are considered to be a provider type regardless of whether they are
* marked {@link ConsumerType} or {@link ProviderType}.
* <p>
* This annotation is not retained at runtime. It is for use by tools to
* understand the semantic version of a package. When a bundle implements a
* consumer type from an imported package, then the bundle's import range for
Expand Down
Expand Up @@ -35,6 +35,10 @@
* both. A type is assumed to be {@link ConsumerType} if it is not marked either
* {@link ConsumerType} or {@link ProviderType}.
* <p>
* A package can be marked {@link ProviderType}. In this case, all types in the
* package are considered to be a provider type regardless of whether they are
* marked {@link ConsumerType} or {@link ProviderType}.
* <p>
* This annotation is not retained at runtime. It is for use by tools to
* understand the semantic version of a package. When a bundle implements a
* provider type from an imported package, then the bundle's import range for
Expand All @@ -47,7 +51,9 @@
*/
@Documented
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.TYPE)
@Target({
ElementType.TYPE, ElementType.PACKAGE
})
public @interface ProviderType {
// marker annotation
}
Expand Up @@ -15,15 +15,15 @@
*/

/**
* OSGi Versioning Annotations Package Version 1.0.
*
* OSGi Versioning Annotations Package Version 1.1.
* <p>
* This package is not used at runtime.
*
* @see <a href="https://www.osgi.org/wp-content/uploads/SemanticVersioning1.pdf"
* >Semantic Versioning</a>
* @see <a href=
* "https://www.osgi.org/wp-content/uploads/SemanticVersioning1.pdf" >
* Semantic Versioning</a>
* @author $Id$
*/
@Version("1.0")
@Version("1.1")
package org.osgi.annotation.versioning;

0 comments on commit 9461b12

Please sign in to comment.