* * *

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

##  org.hamcrest.integration  
Class JMock1Adapter

    
    
    java.lang.Object
      ![extended by ](../../../resources/inherit.gif)**org.hamcrest.integration.JMock1Adapter**
    

**All Implemented Interfaces:**      org.jmock.core.Constraint,
org.jmock.core.SelfDescribing

* * *
    
    
    public class **JMock1Adapter** extends java.lang.Objectimplements org.jmock.core.Constraint

An adapter allowing a Hamcrest [ ` Matcher `
](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") to act as an
jMock1 ` Constraint ` . Note, this is not necessary for jMock2 as it supports
Hamcrest out of the box.

**Author:**

     Joe Walnes 

* * *

**Constructor Summary**  
---  
` **[ JMock1Adapter
](../../../org/hamcrest/integration/JMock1Adapter.html#JMock1Adapter\(org.hamcrest.Matcher\))
** ( [ Matcher ](../../../org/hamcrest/Matcher.html "interface in
org.hamcrest") <?> matcher) `  
  
**Method Summary**  
---  
` static org.jmock.core.Constraint ` |  ` **[ adapt ](../../../org/hamcrest/integration/JMock1Adapter.html#adapt\(org.hamcrest.Matcher\)) ** ( [ Matcher ](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") <?> matcher) `   
Convenience factory method that will adapt a Hamcrest [ ` Matcher `
](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") to act as an
jMock ` Constraint ` .  
` java.lang.StringBuffer ` |  ` **[ describeTo ](../../../org/hamcrest/integration/JMock1Adapter.html#describeTo\(java.lang.StringBuffer\)) ** (java.lang.StringBuffer buffer) `   
  
` boolean ` |  ` **[ eval ](../../../org/hamcrest/integration/JMock1Adapter.html#eval\(java.lang.Object\)) ** (java.lang.Object o) `   
  
**Methods inherited from class java.lang.Object**  
---  
` clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
wait, wait, wait `  
  
**Constructor Detail**  
---  
  
###  JMock1Adapter

    
    
    public **JMock1Adapter**([Matcher](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")<?> matcher)

**Method Detail**  
---  
  
###  adapt

    
    
    public static org.jmock.core.Constraint **adapt**([Matcher](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")<?> matcher)

     Convenience factory method that will adapt a Hamcrest [ ` Matcher ` ](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") to act as an jMock ` Constraint ` . 

    

    

* * *

###  eval

    
    
    public boolean **eval**(java.lang.Object o)

    

**Specified by:**      ` eval ` in interface ` org.jmock.core.Constraint `

    

* * *

###  describeTo

    
    
    public java.lang.StringBuffer **describeTo**(java.lang.StringBuffer buffer)

    

**Specified by:**      ` describeTo ` in interface `
org.jmock.core.SelfDescribing `

    

* * *

|  [ **Overview** ](../../../overview-summary.html) |  [ **Package** ](package-summary.html) |  **Class** |  [ **Use** ](class-use/JMock1Adapter.html) |  [ **Tree** ](package-tree.html) |  [ **Deprecated** ](../../../deprecated-list.html) |  [ **Index** ](../../../index-all.html) |  [ **Help** ](../../../help-doc.html)  
---|---|---|---|---|---|---|---  
__  
[ **PREV CLASS** ](../../../org/hamcrest/integration/EasyMock2Adapter.html "class in org.hamcrest.integ