程序包 org.hamcrest
类 TypeSafeDiagnosingMatcher<T>
- java.lang.Object
- org.hamcrest.BaseMatcher<T>
- org.hamcrest.TypeSafeDiagnosingMatcher<T>
- 类型参数:
T-
- 所有已实现的接口:
Matcher<T>,SelfDescribing
public abstract class TypeSafeDiagnosingMatcher<T> extends BaseMatcher<T>
Convenient base class for Matchers that require a non-null value of a specific type and that will report why the received value has been rejected. This implements the null check, checks the type and then casts. To use, implementmatchesSafely()
.
构造器概要
构造器 限定符 构造器 说明 protectedTypeSafeDiagnosingMatcher()The default constructor for simple sub typesprotectedTypeSafeDiagnosingMatcher(Class<?> expectedType)Use this constructor if the subclass that implementsmatchesSafelyis not the class that binds <T> to a type.protected