net.sf.mmm.util.reflect.base
Class AssignableFromFilter
java.lang.Object
net.sf.mmm.util.reflect.base.AssignableFromFilter
- All Implemented Interfaces:
- Filter<Class<?>>
public class AssignableFromFilter
- extends Object
- implements Filter<Class<?>>
This is a filter that only accepts types
that are assignable from a
special type.
- Since:
- 1.0.1
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
|
Method Summary |
boolean |
accept(Class<?> type)
This method determines if the given value should be accepted. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
superClass
private final Class<?> superClass
- The class
AssignableFromFilter
public AssignableFromFilter(Class<?> superType)
- The constructor.
- Parameters:
superType - is the super-type defining which types to
accept.
accept
public boolean accept(Class<?> type)
- This method determines if the given
value should be accepted.
- Specified by:
accept in interface Filter<Class<?>>
- Parameters:
type - is the value to check.
- Returns:
true if and only if the given type is
assignable from the
super-type defined at construction. This means the given type has to
implement/extend the super-type or be equal to it.
Copyright © 2001-2010 mmm-Team. All Rights Reserved.