* * *

|  [ **Overview** ](../../../overview-summary.html) |  [ **Package** ](package-summary.html) |  **Class** |  [ **Use** ](class-use/IsInstanceOf.html) |  [ **Tree** ](package-tree.html) |  [ **Deprecated** ](../../../deprecated-list.html) |  [ **Index** ](../../../index-all.html) |  [ **Help** ](../../../help-doc.html)  
---|---|---|---|---|---|---|---  
__  
[ **PREV CLASS** ](../../../org/hamcrest/core/IsEqual.html "class in org.hamcrest.core") [ **NEXT CLASS** ](../../../org/hamcrest/core/IsNot.html "class in org.hamcrest.core") |  [ **FRAMES** ](../../../index.html?org/hamcrest/core/IsInstanceOf.html) [ **NO FRAMES** ](IsInstanceOf.html) [ **All Classes** ](../../../allclasses-noframe.html)  
SUMMARY: NESTED | FIELD |  CONSTR  |  METHOD  |  DETAIL: FIELD |  CONSTR  |  METHOD   
  
* * *

##  org.hamcrest.core  
Class IsInstanceOf

    
    
    java.lang.Object
      ![extended by ](../../../resources/inherit.gif)[org.hamcrest.BaseMatcher](../../../org/hamcrest/BaseMatcher.html "class in org.hamcrest")<T>
          ![extended by ](../../../resources/inherit.gif)[org.hamcrest.DiagnosingMatcher](../../../org/hamcrest/DiagnosingMatcher.html "class in org.hamcrest")<java.lang.Object>
              ![extended by ](../../../resources/inherit.gif)**org.hamcrest.core.IsInstanceOf**
    

**All Implemented Interfaces:**      [ Matcher
](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")
<java.lang.Object>, [ SelfDescribing
](../../../org/hamcrest/SelfDescribing.html "interface in org.hamcrest")

* * *
    
    
    public class **IsInstanceOf** extends [DiagnosingMatcher](../../../org/hamcrest/DiagnosingMatcher.html "class in org.hamcrest")<java.lang.Object>

Tests whether the value is an instance of a class. Classes of basic types will
be converted to the relevant "Object" classes

* * *

**Constructor Summary**  
---  
` **[ IsInstanceOf
](../../../org/hamcrest/core/IsInstanceOf.html#IsInstanceOf\(java.lang.Class\))
** (java.lang.Class<?> expectedClass) `  
Creates a new instance of IsInstanceOf  
**Method Summary**  
---  
` static  |  ` <T> [ Matcher ](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") <T> `  
---  
` ` **[ any
](../../../org/hamcrest/core/IsInstanceOf.html#any\(java.lang.Class\)) **
(java.lang.Class<T> type) `  
Creates a matcher that matches when the examined object is an instance of the
specified ` type ` , as determined by calling the ` Class.isInstance(Object) `
method on that type, passing the the examined object.  
` void ` |  ` **[ describeTo ](../../../org/hamcrest/core/IsInstanceOf.html#describeTo\(org.hamcrest.Description\)) ** ( [ Description ](../../../org/hamcrest/Description.html "interface in org.hamcrest") description) `   
Generates a description of the object.  
` static  |  ` <T> [ Matcher ](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") <T> `  
---  
` ` **[ instanceOf
](../../../org/hamcrest/core/IsInstanceOf.html#instanceOf\(java.lang.Class\))
** (java.lang.Class<?> type) `  
Creates a matcher that matches when the examined object is an instance of the
specified ` type ` , as determined by calling the ` Class.isInstance(Object) `
method on that type, passing the the examined object.  
` protected boolean ` |  ` **[ matches ](../../../org/hamcrest/core/IsInstanceOf.html#matches\(java.lang.Object, org.hamcrest.Description\)) ** (java.lang.Object item, [ Description ](../../../org/hamcrest/Description.html "interface in org.hamcrest") mismatch) `   
  
**Methods inherited from class org.hamcrest.[ DiagnosingMatcher
](../../../org/hamcrest/DiagnosingMatcher.html "class in org.hamcrest") **  
---  
` [ describeMismatch
](../../../org/hamcrest/DiagnosingMatcher.html#describeMismatch\(java.lang.Object,
org.hamcrest.Description\)) , [ matches
](../../../org/hamcrest/DiagnosingMatcher.html#matches\(java.lang.Object\)) `  
**Methods inherited from class org.hamcrest.[ BaseMatcher
](../../../org/hamcrest/BaseMatcher.html "class in org.hamcrest") **