/**
* A reimplementation of hamcrest's isA() but without the broken generics.
*/
@Factory
public static Matcher<Object> isA(final Class<?> type) {
return new BaseMatcher<Object>() {
public boolean matches(Object item) {
return type.isInstance(item);
}
public void describeTo(Description description) {
description.appendText("instanceof ").appendValue(type);
}
};
}
Matchers.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:Reer
作者:
评论列表
文章目录