public class ServiceAnnotationObjectProvider extends Object implements ObjectProvider
Service
annotation (which can be applied to fields or parameters), which is used to
disambiguate injection when multiple services implement the same service interface.Constructor and Description |
---|
ServiceAnnotationObjectProvider() |
Modifier and Type | Method and Description |
---|---|
<T> T |
provide(Class<T> objectType,
AnnotationProvider annotationProvider,
ObjectLocator locator)
Provides an object based on an expression.
|
public ServiceAnnotationObjectProvider()
public <T> T provide(Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator)
ObjectProvider
provide
in interface ObjectProvider
objectType
- the expected object typeannotationProvider
- provides access to annotations (typically, the field or parameter to which an
injection-related annotation is attached); annotations on the field or parameter may
also be used when resolving the desired objectlocator
- locator for the context in which the provider is being used${project.version} - Copyright © 2003-2015 The Apache Software Foundation.