@Documented
@Retention(value=CLASS)
@Target(value=TYPE)
public @interface ConsumerType
A non-binary-compatible change to a consumer type or a binary-compatible change to a consumer type affecting an abstract method normally requires incrementing the major version of the type's package. This change will require all providers and all consumers to be updated to handle the change since consumers that implement or extend the consumer type and all providers must understand the change in the consumer type.
A binary-compatible change to a consumer type not affecting an abstract method normally requires incrementing the minor version of the type's package. This change will require all providers to be updated to handle the change, but consumers will not require changes since no abstract methods requiring implementation by the consumer are affected.
A type can be marked ConsumerType
or ProviderType
but not
both. A type is assumed to be ConsumerType
if it is not marked either
ConsumerType
or ProviderType
.
A package can be marked ProviderType
. In this case, all types in the
package are considered to be a provider type regardless of whether they are
marked ConsumerType
or ProviderType
.
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 that package must require the exact major version and a minor version greater than or equal to the package's version.
Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0