org.apache.commons.proxy.interceptor.filter
Class SimpleFilter

java.lang.Object
  extended by org.apache.commons.proxy.interceptor.filter.SimpleFilter
All Implemented Interfaces:
MethodFilter

public class SimpleFilter
extends Object
implements MethodFilter

A simple method filter implementation that merely returns true if the method's name is in a set of accepted names.

Since:
1.0
Author:
James Carman

Constructor Summary
SimpleFilter()
          Creates a simple filter that accepts no methods.
SimpleFilter(String[] methodNames)
          Creates a simple filter that accepts methods matching the supplied names.
 
Method Summary
 boolean accepts(Method method)
          Returns whether or not this filter accepts this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleFilter

public SimpleFilter()
Creates a simple filter that accepts no methods.


SimpleFilter

public SimpleFilter(String[] methodNames)
Creates a simple filter that accepts methods matching the supplied names.

Parameters:
methodNames - the names
Method Detail

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.