jfun.yan.etc
Class TypeFilteredPropertyPredicate

java.lang.Object
  extended by jfun.yan.etc.TypeFilteredPropertyPredicate
All Implemented Interfaces:
PropertyPredicate

public class TypeFilteredPropertyPredicate
extends java.lang.Object
implements PropertyPredicate

A PropertyPredicate implementation that filters property by property name and the declaring class of the property setter method.

This class is not thread safe.

Author:
Ben Yu Jan 18, 2006 9:52:15 PM

Constructor Summary
TypeFilteredPropertyPredicate()
           
 
Method Summary
 TypeFilteredPropertyPredicate addProperty(java.lang.Class type, java.lang.String key)
          Add a single property of a type to the filter list.
 TypeFilteredPropertyPredicate addType(java.lang.Class type)
          Add property setters of an entire class to the filter list.
 boolean isProperty(java.lang.Class type, java.lang.Object key, java.lang.Class property_type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeFilteredPropertyPredicate

public TypeFilteredPropertyPredicate()
Method Detail

isProperty

public boolean isProperty(java.lang.Class type,
                          java.lang.Object key,
                          java.lang.Class property_type)
Specified by:
isProperty in interface PropertyPredicate

addType

public TypeFilteredPropertyPredicate addType(java.lang.Class type)
Add property setters of an entire class to the filter list.

Parameters:
type - the type.
Returns:
this object.

addProperty

public TypeFilteredPropertyPredicate addProperty(java.lang.Class type,
                                                 java.lang.String key)
Add a single property of a type to the filter list.

Parameters:
type - the declaring class.
key - the property key.
Returns:
this object.