org.schmant.support
Class FutureProperty<T>

java.lang.Object
  extended by 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

Field Summary
 String m_name
           
 Object m_object
           
 
Constructor Summary
FutureProperty(Object o, String name)
          Create the future property.
 
Method Summary
 T get()
          Get the value of the object's property.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_object

public final Object m_object

m_name

public final String m_name
Constructor Detail

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().
Method Detail

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