* * *

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

##  org.hamcrest.beans  
Class PropertyUtil

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

* * *
    
    
    public class **PropertyUtil** extends java.lang.Object

Utility class for accessing properties on JavaBean objects.

See http://java.sun.com/products/javabeans/docs/index.html for more
information on JavaBeans.

**Since:**

     1.1.0 
**Author:**

     Iain McGinniss, Steve Freeman 

* * *

**Field Summary**  
---  
` static java.lang.Object[] ` |  ` **[ NO_ARGUMENTS ](../../../org/hamcrest/beans/PropertyUtil.html#NO_ARGUMENTS) ** `   
  
**Constructor Summary**  
---  
` **[ PropertyUtil
](../../../org/hamcrest/beans/PropertyUtil.html#PropertyUtil\(\)) ** () `  
  
**Method Summary**  
---  
` static java.beans.PropertyDescriptor ` |  ` **[ getPropertyDescriptor ](../../../org/hamcrest/beans/PropertyUtil.html#getPropertyDescriptor\(java.lang.String, java.lang.Object\)) ** (java.lang.String propertyName, java.lang.Object fromObj) `   
Returns the description of the property with the provided name on the provided
object's interface.  
` static java.beans.PropertyDescriptor[] ` |  ` **[ propertyDescriptorsFor ](../../../org/hamcrest/beans/PropertyUtil.html#propertyDescriptorsFor\(java.lang.Object, java.lang.Class\)) ** (java.lang.Object fromObj, java.lang.Class<java.lang.Object> stopClass) `   
Returns all the property descriptors for the class associated with the given
object  
**Methods inherited from class java.lang.Object**  
---  
` clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
wait, wait, wait `  
  
**Field Detail**  
---  
  
###  NO_ARGUMENTS

    
    
    public static final java.lang.Object[] **NO_ARGUMENTS**

**Constructor Detail**  
---  
  
###  PropertyUtil

    
    
    public **PropertyUtil**()

**Method Detail**  
---  
  
###  getPropertyDescriptor

    
    
    public static java.beans.PropertyDescriptor **getPropertyDescriptor**(java.lang.String propertyName,
                                                                      java.lang.Object fromObj)
                                                               throws java.lang.IllegalArgumentException

     Returns the description of the property with the provided name on the provided object's interface. 

    

**Returns:**      the descriptor of the property, or null if the property does
not exist.  **Throws:**      ` java.lang.IllegalArgumentException ` \- if
there's a introspection failure

* * *

###  propertyDescriptorsFor

    
    
    public static java.beans.PropertyDescriptor[] **propertyDescriptorsFor**(java.lang.Object fromObj,
                                                                         java.lang.Class<java.lang.Object> stopClass)
                                                                  throws java.lang.IllegalArgumentException

     Returns all the property descriptors for the class associated with the given object 

    

**Parameters:**      ` fromObj ` \- Use the class of this object      `
stopClass ` \- Don't include any properties from this ancestor class upwards.