@Documented @Qualifier @Retention(value=RUNTIME) @Target(value={FIELD,METHOD,TYPE,TYPE_USE}) public @interface Service
The behavior of this annotation depends on it's usage:
@Service
on both type and type_use will result in a definition
error.
Where this annotation is used affects how service scopes are supported:
@SingleComponent
,
@FactoryComponent
or @Dependent
bean - The provided service can be of any scope. The bean can either
implement ServiceFactory
or
PrototypeServiceFactory
or use
@Bundle
or @Prototype
to set it's
service scope. If none of those options are used the service is a singleton
scope service.@ApplicationScoped
bean - The provided service
is a singleton scope service unless the bean implements ServiceFactory
or PrototypeServiceFactory
.
It cannot use @Bundle
or @Prototype
to set it's service scope. Use of those annotations in this case will result
in a definition error.public abstract Class<?>[] value
Copyright © Contributors to the Eclipse Foundation Licensed under the Eclipse Foundation Specification License – v1.0