|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Documented @Retention(value=RUNTIME) @Target(value=TYPE) public @interface SupersedesService
Ensures smooth transition from older versions of services interfaces to their newer versions.
For example, assume there was a service interface or class A
. It was superseded by
B extends A
which is annotated with @SupersedesService(A.class)
. A becomes deprecated.
The first step in migration is to change all users for A
to B
.
This is where SupersedesService
annotation comes into play, since Services
will
find providers for A
, if being requested to find providers of B
.
As soon as
all users of the service had migrated, providers can start providing B
instead of A
.
As soon as all providers had migrated, deprecated A
can be removed altogether.
Required Element Summary | |
---|---|
Class<?> |
value
Type that was superseded by a type with this annotation. |
Optional Element Summary | |
---|---|
String |
adapterMethod
The old-to-new static conversion method name to use when the old type (referenced to by value() ) does not extend the new one that is being annotated. |
Element Detail |
---|
public abstract Class<?> value
public abstract String adapterMethod
value()
) does not extend the new one that is being annotated.
This method names has to correspond to a static method with one argument of type
that is equal to value()
of this annotation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |