Interface PropertyShadowBuilder

All Known Implementing Classes:

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).

Method Summary
<T> T
build(Object source, String propertyName, Class<T> propertyType)

Method Detail


<T> T build(Object source,
            String propertyName,
            Class<T> propertyType)
Type Parameters:
T -
source - the object from which a property will be extracted
propertyName - the name of a property of the object, which must be readable
propertyType - the expected type of the property, the actual property type must be assignable to this type
the shadow

Copyright © 2003-2012 The Apache Software Foundation.