Class ValueObjectProvider
-
- org.apache.tapestry5.ioc.internal.services.ValueObjectProvider
-
- All Implemented Interfaces:
ObjectProvider
public class ValueObjectProvider extends implements ObjectProvider
Provides an object when theValue
annotation is present. The string value has symbols expanded, and then iscoerced
to the associated type. The value may first be coerced to an intermediate type if theIntermediateType
annotation is present.
-
-
Constructor Summary
Constructors Constructor Description ValueObjectProvider(SymbolSource symbolSource, TypeCoercer typeCoercer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator)
Provides an object based on an expression.
-
-
-
Constructor Detail
-
ValueObjectProvider
public ValueObjectProvider(@Builtin SymbolSource symbolSource, @Builtin TypeCoercer typeCoercer)
-
-
Method Detail
-
provide
public <T> T <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 interfaceObjectProvider
- 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 used- Returns:
- the requested object, or null if this object provider can not supply an object
-
-