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.
When the value is required and no {@link ObjectProvider} provided a non-null value, then {@link ObjectLocator#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.
@param objectType the expected object type
@param annotationProvider provides access to annotations (typically, the field or parameter to which aninjection-related annotation is attached); annotations on the field or parameter may also be used when resolving the desired object
@param locator locator for the
context in which the provider is being used
@param required if true (normal case) a value must be provided; if false then it is allowed for noObjectProvider to provide a value, and this method may return null to indicate the failure
@param < T>
@return the requested object, or null if this object provider can not supply an object
@throws RuntimeException if the expression can not be evaluated, or the type of object identified is notassignable to the type specified by the objectType parameter