) `  
**Methods inherited from class java.lang.Object**  
---  
` clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait,
wait `  
  
**Constructor Detail**  
---  
  
###  HasProperty

    
    
    public **HasProperty**(java.lang.String propertyName)

**Method Detail**  
---  
  
###  matchesSafely

    
    
    public boolean **matchesSafely**([T](../../../org/hamcrest/beans/HasProperty.html "type parameter in HasProperty") obj)

     **Description copied from class:` [ TypeSafeMatcher ](../../../org/hamcrest/TypeSafeMatcher.html#matchesSafely\(T\)) ` **
     Subclasses should implement this. The item will already have been checked for the specific type and will never be null. 

    

**Specified by:**      ` [ matchesSafely
](../../../org/hamcrest/TypeSafeMatcher.html#matchesSafely\(T\)) ` in class `
[ TypeSafeMatcher ](../../../org/hamcrest/TypeSafeMatcher.html "class in
org.hamcrest") < [ T ](../../../org/hamcrest/beans/HasProperty.html "type
parameter in HasProperty") > `

    

* * *

###  describeMismatchSafely

    
    
    public void **describeMismatchSafely**([T](../../../org/hamcrest/beans/HasProperty.html "type parameter in HasProperty") item,
                                       [Description](../../../org/hamcrest/Description.html "interface in org.hamcrest") mismatchDescription)

     **Description copied from class:` [ TypeSafeMatcher ](../../../org/hamcrest/TypeSafeMatcher.html#describeMismatchSafely\(T, org.hamcrest.Description\)) ` **
     Subclasses should override this. The item will already have been checked for the specific type and will never be null. 

    

**Overrides:**      ` [ describeMismatchSafely
](../../../org/hamcrest/TypeSafeMatcher.html#describeMismatchSafely\(T,
org.hamcrest.Description\)) ` in class ` [ TypeSafeMatcher
](../../../org/hamcrest/TypeSafeMatcher.html "class in org.hamcrest") < [ T
](../../../org/hamcrest/beans/HasProperty.html "type parameter in
HasProperty") > `

    

* * *

###  describeTo

    
    
    public void **describeTo**([Description](../../../org/hamcrest/Description.html "interface in org.hamcrest") description)

     **Description copied from interface:` [ SelfDescribing ](../../../org/hamcrest/SelfDescribing.html#describeTo\(org.hamcrest.Description\)) ` **
     Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately. 

    

**Parameters:**      ` description ` \- The description to be built or
appended to.

* * *

###  hasProperty

    
    
    public static <T> [Matcher](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")<T> **hasProperty**(java.lang.String propertyName)

     Creates a matcher that matches when the examined object has a JavaBean property with the specified name. 

For example:

    
    
    assertThat(myBean, hasProperty("foo"))

    

**Parameters:**      ` propertyName ` \- the name of the JavaBean property
that examined beans should possess

* * *

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