|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.classify.SubclassClassifier<Throwable,Boolean> org.springframework.batch.classify.BinaryExceptionClassifier
public class BinaryExceptionClassifier
A 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 Summary | |
---|---|
BinaryExceptionClassifier()
Create a binary exception classifier with the default value (false). |
|
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. |
Method Summary | |
---|---|
void |
setTypes(Collection<Class<? extends Throwable>> types)
Set of Throwable class types to keys for the classifier. |
Methods inherited from class org.springframework.batch.classify.SubclassClassifier |
---|
classify, getDefault, setDefaultValue, setTypeMap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinaryExceptionClassifier(boolean defaultValue)
setTypes(Collection)
is used to narrow the field.
defaultValue
- defaults to falsepublic BinaryExceptionClassifier()
public BinaryExceptionClassifier(Collection<Class<? extends Throwable>> exceptionClasses, boolean value)
value
- public BinaryExceptionClassifier(Collection<Class<? extends Throwable>> exceptionClasses)
Method Detail |
---|
public final void setTypes(Collection<Class<? extends Throwable>> types)
types
- the types to classify as non-default
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |