org.apache.tapestry5.ioc.services
Interface PropertyShadowBuilder
- All Known Implementing Classes:
- PropertyShadowBuilderImpl
public interface PropertyShadowBuilder
Creates a "shadow" of a property of an object. The shadow has the same type as the property, and delegates all method
invocations to the property. Each method invocation on the shadow re-acquires the value of the property from the
underlying object and delegates to the current value of the property.
Typically, the object in question is another service, one with the "perthread" service lifecycle. This allows a
global singleton to shadow a value that is specific to the current thread (and therefore, the current request).
build
<T> T build(Object source,
String propertyName,
Class<T> propertyType)
- Type Parameters:
T
- - Parameters:
source
- the object from which a property will be extractedpropertyName
- the name of a property of the object, which must be readablepropertyType
- the expected type of the property, the actual property type must be assignable to this type
- Returns:
- the shadow
Copyright © 2003-2012 The Apache Software Foundation.