Package org.springframework.util
Class ExceptionTypeFilter
- java.lang.Object
- org.springframework.util.InstanceFilter<Class<? extends Throwable>>
- org.springframework.util.ExceptionTypeFilter
public class ExceptionTypeFilter extends InstanceFilter<Class<? extends Throwable>>
AnInstanceFilter
implementation that handles exception types. A type will match against a given candidate if it is assignable to that candidate.- Since:
- 4.1
- Author:
- Stephane Nicoll
Constructor Summary
Constructors Constructor Description ExceptionTypeFilter(Collection<? extends Class<? extends Throwable>> includes, Collection<? extends Class<? extends Throwable>> excludes, boolean matchIfEmpty)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
match(Class<? extends Throwable> instance, Class<? extends Throwable> candidate)
Determine if the specifiedinstance
is equal to the specifiedcandidate
.Methods inherited from class org.springframework.util.InstanceFilter
match, match, toString
Constructor Detail
ExceptionTypeFilter
public ExceptionTypeFilter(Collection<? extends Class<? extends Throwable>> includes, Collection<? extends Class<? extends Throwable>> excludes, boolean matchIfEmpty)
Method Detail
match
protected boolean match(Class<? extends Throwable> instance, Class<? extends Throwable> candidate)
Description copied from class:InstanceFilter
Determine if the specifiedinstance
is equal to the specifiedcandidate
.- Overrides:
match
in classInstanceFilter<Class<? extends Throwable>>
- Parameters:
instance
- the instance to handlecandidate
- a candidate defined by this filter- Returns:
true
if the instance matches the candidate