public class ClassSelector extends ObjectSelector<Object,Class<?>>
Selector
that uses Class.isAssignableFrom(Class)
to determine a match.Constructor and Description |
---|
ClassSelector(Class<?> type)
Creates a new ClassSelector that will match keys that are the same as, or are a
super type of the given
type , i.e. the key is assignable according to
Class.isAssignableFrom(Class) . |
Modifier and Type | Method and Description |
---|---|
boolean |
matches(Object key)
Indicates whether this Selector matches the
key . |
static Selector |
typeSelector(Class<?> supertype)
Creates a
ClassSelector based on the given class type that only matches if the
key being matched is assignable according to Class.isAssignableFrom(Class) . |
clone, getHeaderResolver, getObject, objectSelector, test, toString
public ClassSelector(Class<?> type)
type
, i.e. the key is assignable according to
Class.isAssignableFrom(Class)
.type
- The type to matchpublic static Selector typeSelector(Class<?> supertype)
ClassSelector
based on the given class type that only matches if the
key being matched is assignable according to Class.isAssignableFrom(Class)
.supertype
- The supertype to compare.Selector
.Copyright © 2017. All rights reserved.