jfun.yan.etc
Class FilteredPropertyBinder

java.lang.Object
  extended by jfun.yan.etc.FilteredPropertyBinder
All Implemented Interfaces:
java.io.Serializable, PropertyBinder

public class FilteredPropertyBinder
extends java.lang.Object
implements PropertyBinder

A PropertyBinder decorator that will return a Creator instance if the property satisfies a predicate. Otherwise, control is forwarded to an alternative PropertyBinder instance.

Author:
Ben Yu Jan 18, 2006 9:27:52 PM
See Also:
Serialized Form

Constructor Summary
FilteredPropertyBinder(PropertyPredicate pred, Creator consequence, PropertyBinder alternative)
          Create a FilteredPropertyBinder instance.
 
Method Summary
 Creator bind(java.lang.Class component_type, java.lang.Object key, java.lang.Class type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteredPropertyBinder

public FilteredPropertyBinder(PropertyPredicate pred,
                              Creator consequence,
                              PropertyBinder alternative)
Create a FilteredPropertyBinder instance.

Parameters:
pred - the predicate.
consequence - the consequence.
alternative - the alternative.
Method Detail

bind

public Creator bind(java.lang.Class component_type,
                    java.lang.Object key,
                    java.lang.Class type)
Specified by:
bind in interface PropertyBinder