org.apache.commons.proxy.interceptor.filter
Class PatternFilter
java.lang.Object
org.apache.commons.proxy.interceptor.filter.PatternFilter
- All Implemented Interfaces:
- MethodFilter
public class PatternFilter
- extends Object
- implements MethodFilter
A method filter implementation that returns true if the method's name matches a supplied regular expression (JDK
regex) pattern string.
- Since:
- 1.0
- Author:
- James Carman
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GETTER_SETTER_PATTERN
public static String GETTER_SETTER_PATTERN
PatternFilter
public PatternFilter(String pattern)
getterSetterFilter
public static MethodFilter getterSetterFilter()
- Returns a
MethodFilter
which accepts only "getters" and "setters."
- Returns:
- a
MethodFilter
which accepts only "getters" and "setters."
accepts
public boolean accepts(Method method)
- Description copied from interface:
MethodFilter
- Returns whether or not this filter accepts this method.
- Specified by:
accepts
in interface MethodFilter
- Parameters:
method
- the method
- Returns:
- whether or not this filter accepts this method
Copyright © 2005-2008 The Apache Software Foundation. All Rights Reserved.