net.beandocument
Class SimpleBeanContentFilter

java.lang.Object
  extended bynet.beandocument.SimpleBeanContentFilter
All Implemented Interfaces:
BeanContentFilter

public class SimpleBeanContentFilter
extends java.lang.Object
implements BeanContentFilter

Simple filter implementation which matches the given content as regular expressions against the given conditions.

Author:
Jens Scheffler

Constructor Summary
SimpleBeanContentFilter(java.lang.Class beanClassFilter, java.lang.String memberNameFilter, java.lang.Class memberClassFilter)
          Constructor for a new simple filter.
SimpleBeanContentFilter(java.lang.Class beanClassFilter, java.lang.String memberNameFilter, java.lang.String memberClassNameFilter)
          Constructor for a new simple filter.
SimpleBeanContentFilter(java.lang.String beanClassNameFilter, java.lang.String memberNameFilter, java.lang.Class memberClassFilter)
          Constructor for a new simple filter.
SimpleBeanContentFilter(java.lang.String beanClassNameFilter, java.lang.String memberNameFilter, java.lang.String memberClassNameFilter)
          Constructor for a new simple filter.
 
Method Summary
 boolean match(java.lang.Class beanClass, java.lang.String memberName, java.lang.Class memberClass)
          Tries to match a given member information against the filter instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleBeanContentFilter

public SimpleBeanContentFilter(java.lang.String beanClassNameFilter,
                               java.lang.String memberNameFilter,
                               java.lang.String memberClassNameFilter)
Constructor for a new simple filter. All given conditions need to be set with this constructor. Each condition will be matched using regular expressions against the test criterias. Criterias which are supplied as null will be ignored.

Parameters:
beanClassNameFilter - Filter expression for the class name to match for
memberNameFilter - Filter expression for the member name to filter for
memberClassNameFilter - Filter expression for the members class name to filter for

SimpleBeanContentFilter

public SimpleBeanContentFilter(java.lang.Class beanClassFilter,
                               java.lang.String memberNameFilter,
                               java.lang.String memberClassNameFilter)
Constructor for a new simple filter. All given conditions need to be set with this constructor. String conditions will be matched using regular expressions against the test criterias. Class type criterias will be matched using the check if assignable. Criterias which are supplied as null will be ignored.

Parameters:
beanClassFilter - Class which needs to correspond with the given filter criteria
memberNameFilter - Filter expression for the member name to filter for
memberClassNameFilter - Filter expression for the members class name to filter for

SimpleBeanContentFilter

public SimpleBeanContentFilter(java.lang.String beanClassNameFilter,
                               java.lang.String memberNameFilter,
                               java.lang.Class memberClassFilter)
Constructor for a new simple filter. All given conditions need to be set with this constructor. String conditions will be matched using regular expressions against the test criterias. Class type criterias will be matched using the check if assignable. Criterias which are supplied as null will be ignored.

Parameters:
beanClassNameFilter - Filter expression for the class name to match for
memberNameFilter - Filter expression for the member name to filter for
memberClassFilter - Class which needs to correspond with the given filter criteria

SimpleBeanContentFilter

public SimpleBeanContentFilter(java.lang.Class beanClassFilter,
                               java.lang.String memberNameFilter,
                               java.lang.Class memberClassFilter)
Constructor for a new simple filter. All given conditions need to be set with this constructor. String conditions will be matched using regular expressions against the test criterias. Class type criterias will be matched using the check if assignable. Criterias which are supplied as null will be ignored.

Parameters:
beanClassFilter - Class which needs to correspond with the given filter criteria
memberNameFilter - Filter expression for the member name to filter for
memberClassFilter - Class which needs to correspond with the given filter criteria
Method Detail

match

public boolean match(java.lang.Class beanClass,
                     java.lang.String memberName,
                     java.lang.Class memberClass)
Tries to match a given member information against the filter instance.

Specified by:
match in interface BeanContentFilter
Parameters:
beanClass - Class of the bean to match
memberName - Name of the member which is evaluated
memberClass - Class of the member
Returns:
Flag if the given member information matches for the given filter
See Also:
BeanContentFilter.match(java.lang.Class, java.lang.String, java.lang.Class)