Annotation Type ProviderType
-
@Documented @Retention(CLASS) @Target({TYPE,PACKAGE}) public @interface ProviderTypeA type implemented by, or extended by, the Provider Role.A non-binary-compatible change to a provider type 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. However, a non-binary-compatible change affecting a
protectedaccess member only 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 they only use, and do not extend, the provider type and thus could not accessprotectedaccess members of the provider type.A binary-compatible change to a provider type 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 they only use, and do not implement or extend, the provider type.
A type can be marked
ConsumerTypeorProviderTypebut not both. A type is assumed to beConsumerTypeif it is not marked eitherConsumerTypeorProviderType.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 markedConsumerTypeorProviderType.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 that package must require the package's exact major and minor version.
- See Also:
- Semantic Versioning