@Test public void canDetermineMatcherTypeFromProtectedMatchesSafelyMethod() { assertFalse(matcher.matches(null)); assertFalse(matcher.matches(10)); }
@Override @SuppressWarnings({"unchecked"}) public final boolean matches(Object item) { return item != null && expectedType.isInstance(item) && matchesSafely((T) item); }
TypeSafeMatcher extends BaseMatcher<T> { @Override @SuppressWarnings({"unchecked"}) public final boolean matches(Object item) { return item != null && expectedType.isInstance(item) && matchesSafely((T) item); } }
TypeSafeMatcher extends BaseMatcher<T> { @Override @SuppressWarnings({"unchecked"}) public final boolean matches(Object item) { return item != null && expectedType.isInstance(item) && matchesSafely((T) item); } protected  TypeSafeMatcher(); protected  TypeSafeMatcher(Class<?> expectedType); protected  TypeSafeMatcher(ReflectiveTypeFinder typeFinder); }
TypeSafeMatcher extends BaseMatcher<T> { @Override @SuppressWarnings({"unchecked"}) public final boolean matches(Object item) { return item != null && expectedType.isInstance(item) && matchesSafely((T) item); } protected  TypeSafeMatcher(); protected  TypeSafeMatcher(Class<?> expectedType); protected  TypeSafeMatcher(ReflectiveTypeFinder typeFinder); @Override @SuppressWarnings({"unchecked"}) final boolean matches(Object item); @SuppressWarnings("unchecked") @Override final void describeMismatch(Object item, Description description); }
TypeSafeMatcher extends BaseMatcher<T> { @Override @SuppressWarnings({"unchecked"}) public final boolean matches(Object item) { return item != null && expectedType.isInstance(item) && matchesSafely((T) item); } protected  TypeSafeMatcher(); protected  TypeSafeMatcher(Class<?> expectedType); protected  TypeSafeMatcher(ReflectiveTypeFinder typeFinder); @Override @SuppressWarnings({"unchecked"}) final boolean matches(Object item); @SuppressWarnings("unchecked") @Override final void describeMismatch(Object item, Description description);  }