Class ValueObjectProvider

  extended by
All Implemented Interfaces:

public class ValueObjectProvider
extends Object
implements ObjectProvider

Provides an object when the Value annotation is present. The string value has symbols expanded, and then is coerced to the associated type. The value may first be coerced to an intermediate type if the IntermediateType annotation is present.

Constructor Summary
ValueObjectProvider(SymbolSource symbolSource, TypeCoercer typeCoercer)
Method Summary
<T> T
provide(Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator)
          Provides an object based on an expression.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ValueObjectProvider(@Builtin
                           SymbolSource symbolSource,
                           TypeCoercer typeCoercer)
Method Detail


public <T> T provide(Class<T> objectType,
                     AnnotationProvider annotationProvider,
                     ObjectLocator locator)
Description copied from interface: ObjectProvider
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.

Specified by:
provide in interface ObjectProvider
objectType - the expected object type
annotationProvider - 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 object
locator - locator for the context in which the provider is being used
the requested object, or null if this object provider can not supply an object

Copyright © 2003-2012 The Apache Software Foundation.