org.schmant.support
Class FutureProperty<T>
java.lang.Object
org.schmant.support.FutureProperty<T>
- All Implemented Interfaces:
- Producer<T>
public class FutureProperty<T>
- extends Object
- implements Producer<T>
Objects of this type represent future property values of other objects.
This is useful for configuring task factories with property values that do
not yet exist when running tasks with a TaskExecutor
.
- Since:
- 0.5
- Author:
- Karl Gustafsson
m_object
public final Object m_object
m_name
public final String m_name
FutureProperty
public FutureProperty(Object o,
String name)
- Create the future property.
- Parameters:
o
- The object with the property.name
- The property's name. This will be mapped into a getter method
name. The property document
is for instance mapped to the getter
method getDocument()
.
get
public T get()
- Get the value of the object's property. This method looks up a getter
method on the target object, calls it and returns the result.
- Specified by:
get
in interface Producer<T>
- Returns:
- The property value.
toString
public String toString()
- Overrides:
toString
in class Object