org.hamcrest.core
Class IsInstanceOf
java.lang.Object
org.hamcrest.BaseMatcher<java.lang.Object>
org.hamcrest.core.IsInstanceOf
- All Implemented Interfaces:
- org.hamcrest.Matcher<java.lang.Object>, org.hamcrest.SelfDescribing
public class IsInstanceOf
- extends org.hamcrest.BaseMatcher<java.lang.Object>
Tests whether the value is an instance of a class.
Constructor Summary |
IsInstanceOf(java.lang.Class<?> theClass)
Creates a new instance of IsInstanceOf |
Method Summary |
void |
describeTo(org.hamcrest.Description description)
|
static org.hamcrest.Matcher<java.lang.Object> |
instanceOf(java.lang.Class<?> type)
Is the value an instance of a particular type? |
boolean |
matches(java.lang.Object item)
|
Methods inherited from class org.hamcrest.BaseMatcher |
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IsInstanceOf
public IsInstanceOf(java.lang.Class<?> theClass)
- Creates a new instance of IsInstanceOf
- Parameters:
theClass
- The predicate evaluates to true for instances of this class
or one of its subclasses.
matches
public boolean matches(java.lang.Object item)
describeTo
public void describeTo(org.hamcrest.Description description)
instanceOf
public static org.hamcrest.Matcher<java.lang.Object> instanceOf(java.lang.Class<?> type)
- Is the value an instance of a particular type?