Home » tapestry-src-5.0.19 » org.apache.tapestry5.ioc » [javadoc | source]
public interface: ObjectProvider [javadoc | source]

All Known Implementing Classes:
    ServiceAnnotationObjectProvider, SymbolObjectProvider, AssetObjectProvider, AliasImpl, ValueObjectProvider

Object providers represent an alternate way to locate an object provided somewhere in the org.apache.tapestry5.ioc.Registry . Instead of using a just the service id to gain access to a service within the Registry, object providers in different flavors are capable of vending, or even creating, objects of disparate types from disparate sources.

Object providers are consulted in a strict order, and the first non-null result is taken.

In many cases, an object provider searches for additional annotations on the element (usually a parameter, or perhaps a field) for which a value is required.
Method from org.apache.tapestry5.ioc.ObjectProvider Summary:
Method from org.apache.tapestry5.ioc.ObjectProvider Detail:
 public T provide(Class<T> objectType,
    AnnotationProvider annotationProvider,
    ObjectLocator locator)
    Provides 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.