public class BinaryExceptionClassifier extends SubclassClassifier<Throwable,Boolean>
Classifier
for exceptions that has only two classes (true and
false). Classifies objects according to their inheritance relation with the
supplied types. If the object to be classified is one of the provided types,
or is a subclass of one of the types, then the non-default value is returned
(usually true).SubclassClassifier
Constructor and Description |
---|
BinaryExceptionClassifier(boolean defaultValue)
Create a binary exception classifier with the provided default value.
|
BinaryExceptionClassifier(Collection<Class<? extends Throwable>> exceptionClasses)
Create a binary exception classifier with the default value false and
value mapping true for the provided classes and their subclasses.
|
BinaryExceptionClassifier(Collection<Class<? extends Throwable>> exceptionClasses,
boolean value)
Create a binary exception classifier with the provided classes and their
subclasses.
|
BinaryExceptionClassifier(Map<Class<? extends Throwable>,Boolean> typeMap)
Create a binary exception classifier using the given classification map
and a default classification of false.
|
BinaryExceptionClassifier(Map<Class<? extends Throwable>,Boolean> typeMap,
boolean defaultValue)
Create a binary exception classifier using the given classification map
and a default classification of false.
|
classify, getDefault, setDefaultValue, setTypeMap
public BinaryExceptionClassifier(boolean defaultValue)
defaultValue
- defaults to falsepublic BinaryExceptionClassifier(Collection<Class<? extends Throwable>> exceptionClasses, boolean value)
value
- public BinaryExceptionClassifier(Collection<Class<? extends Throwable>> exceptionClasses)
public BinaryExceptionClassifier(Map<Class<? extends Throwable>,Boolean> typeMap)
typeMap
- Copyright © 2013 SpringSource. All rights reserved.