Allows annotating any number of no-arg boolean methods in a service implementation with @CheckAvailability.
If the annotation is present on the type as well as at least one method, the method will be invoked to let the service decide itself, whether it is available.
Should the method be static, the service will not even be instantiated.
@CheckAvailability
public class FooImpl implements FooService {
@CheckAvailability
public static boolean isSupported() {
return "enabled".equals(System.getProperty("plugin.status"));
}
}
Allows annotating any number of no-arg boolean methods in a service implementation with
@CheckAvailability
.If the annotation is present on the type as well as at least one method, the method will be invoked to let the service decide itself, whether it is available.
Should the method be
static
, the service will not even be instantiated.