Class MasterObjectProviderImpl
- java.lang.Object
-
- org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl
-
- All Implemented Interfaces:
MasterObjectProvider
@PreventServiceDecoration public class MasterObjectProviderImpl extends java.lang.Object implements MasterObjectProvider
-
-
Constructor Summary
Constructors Constructor Description MasterObjectProviderImpl(java.util.List<ObjectProvider> configuration, OperationTracker tracker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tprovide(java.lang.Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator, boolean required)Provides an object based on an expression.
-
-
-
Constructor Detail
-
MasterObjectProviderImpl
public MasterObjectProviderImpl(java.util.List<ObjectProvider> configuration, OperationTracker tracker)
-
-
Method Detail
-
provide
public <T> T provide(java.lang.Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator, boolean required)
Description copied from interface:MasterObjectProviderProvides an object based on an expression. The process of providing objects occurs within a particular context, which will typically be a service builder method, service contributor method, or service decorator method. The locator parameter provides access to the services visible to that context. When the value is required and noObjectProviderprovided a non-null value, thenObjectLocator.getService(Class, Class[])is invoked (with no marker annotations), to provide a uniquely matching service, or throw a failure exception if no single service can be found.- Specified by:
providein interfaceMasterObjectProvider- Parameters:
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 usedrequired- if true (normal case) a value must be provided; if false then it is allowed for no ObjectProvider to provide a value, and this method may return null to indicate the failure- Returns:
- the requested object, or null if this object provider can not supply an object
-
-