org.ikasan.framework.exception.matching
Class ThrowableCauseMatcher
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeMatcher<Throwable>
org.ikasan.framework.exception.matching.ThrowableCauseMatcher
- All Implemented Interfaces:
- org.hamcrest.Matcher<Throwable>, org.hamcrest.SelfDescribing
public class ThrowableCauseMatcher
- extends org.hamcrest.TypeSafeMatcher<Throwable>
Implementation of TypeSafeMatcher for matching instances of Throwable
by considering the cause of the Throwable
When passed a throwable for matching, this implementation will apply another matcher to both
that throwable and its cause. If the 'directly' flag is set to false, then it will also continue recursively
up the cause stace of the throwable looking for a match
- Author:
- Ikasan Development Team
| Methods inherited from class org.hamcrest.TypeSafeMatcher |
matches |
| Methods inherited from class org.hamcrest.BaseMatcher |
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
ThrowableCauseMatcher
public ThrowableCauseMatcher(org.hamcrest.Matcher<?> causeMatcher,
boolean directly)
- Constructor
- Parameters:
causeMatcher - directly -
ThrowableCauseMatcher
public ThrowableCauseMatcher(org.hamcrest.Matcher<?> causeMatcher)
- Constructor
- Parameters:
causeMatcher -
matchesSafely
public boolean matchesSafely(Throwable throwable)
- Specified by:
matchesSafely in class org.hamcrest.TypeSafeMatcher<Throwable>
describeTo
public void describeTo(org.hamcrest.Description description)
Copyright © 2007-2012 Ikasan. All Rights Reserved.