Java Doc for PropertyUtils.java in  » Library » Apache-commons-beanutils-1.8.0-BETA-src » org » apache » commons » beanutils » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache commons beanutils 1.8.0 BETA src » org.apache.commons.beanutils 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.beanutils.PropertyUtils

PropertyUtils
public class PropertyUtils (Code)

Utility methods for using Java Reflection APIs to facilitate generic property getter and setter operations on Java objects.

The implementations for these methods are provided by PropertyUtilsBean. For more details see PropertyUtilsBean .


author:
   Craig R. McClanahan
author:
   Ralph Schaer
author:
   Chris Audley
author:
   Rey Francois
author:
   Gregor Rayman
author:
   Jan Sorensen
author:
   Scott Sanders
version:
   $Revision: 555845 $ $Date: 2007-07-13 03:52:05 +0100 (Fri, 13 Jul 2007) $
See Also:   PropertyUtilsBean
See Also:   org.apache.commons.beanutils.expression.Resolver


Field Summary
final public static  charINDEXED_DELIM
     The delimiter that preceeds the zero-relative subscript for an indexed reference.
final public static  charINDEXED_DELIM2
     The delimiter that follows the zero-relative subscript for an indexed reference.
final public static  charMAPPED_DELIM
     The delimiter that preceeds the key of a mapped property.
final public static  charMAPPED_DELIM2
     The delimiter that follows the key of a mapped property.
final public static  charNESTED_DELIM
     The delimiter that separates the components of a nested reference.


Method Summary
public static  voidclearDescriptors()
     Clear any cached property descriptors information for all classes loaded by any class loaders.
public static  voidcopyProperties(Object dest, Object orig)
    
public static  Mapdescribe(Object bean)
    
public static  intgetDebug()
    
public static  ObjectgetIndexedProperty(Object bean, String name)
    
public static  ObjectgetIndexedProperty(Object bean, String name, int index)
    
public static  ObjectgetMappedProperty(Object bean, String name)
    
public static  ObjectgetMappedProperty(Object bean, String name, String key)
    
public static  FastHashMapgetMappedPropertyDescriptors(Class beanClass)
    
public static  FastHashMapgetMappedPropertyDescriptors(Object bean)
    
public static  ObjectgetNestedProperty(Object bean, String name)
    
public static  ObjectgetProperty(Object bean, String name)
    
public static  PropertyDescriptorgetPropertyDescriptor(Object bean, String name)
    
public static  PropertyDescriptor[]getPropertyDescriptors(Class beanClass)
    
public static  PropertyDescriptor[]getPropertyDescriptors(Object bean)
    
public static  ClassgetPropertyEditorClass(Object bean, String name)
    
public static  ClassgetPropertyType(Object bean, String name)
    
public static  MethodgetReadMethod(PropertyDescriptor descriptor)
    
public static  ObjectgetSimpleProperty(Object bean, String name)
    
public static  MethodgetWriteMethod(PropertyDescriptor descriptor)
    
public static  booleanisReadable(Object bean, String name)
    
public static  booleanisWriteable(Object bean, String name)
    
public static  voidsetDebug(int newDebug)
    
public static  voidsetIndexedProperty(Object bean, String name, Object value)
    
public static  voidsetIndexedProperty(Object bean, String name, int index, Object value)
    
public static  voidsetMappedProperty(Object bean, String name, Object value)
    
public static  voidsetMappedProperty(Object bean, String name, String key, Object value)
    
public static  voidsetNestedProperty(Object bean, String name, Object value)
    
public static  voidsetProperty(Object bean, String name, Object value)
    
public static  voidsetSimpleProperty(Object bean, String name, Object value)
    

Field Detail
INDEXED_DELIM
final public static char INDEXED_DELIM(Code)
The delimiter that preceeds the zero-relative subscript for an indexed reference. org.apache.commons.beanutils.expression.Resolver



INDEXED_DELIM2
final public static char INDEXED_DELIM2(Code)
The delimiter that follows the zero-relative subscript for an indexed reference. org.apache.commons.beanutils.expression.Resolver



MAPPED_DELIM
final public static char MAPPED_DELIM(Code)
The delimiter that preceeds the key of a mapped property. org.apache.commons.beanutils.expression.Resolver



MAPPED_DELIM2
final public static char MAPPED_DELIM2(Code)
The delimiter that follows the key of a mapped property. org.apache.commons.beanutils.expression.Resolver



NESTED_DELIM
final public static char NESTED_DELIM(Code)
The delimiter that separates the components of a nested reference. org.apache.commons.beanutils.expression.Resolver





Method Detail
clearDescriptors
public static void clearDescriptors()(Code)
Clear any cached property descriptors information for all classes loaded by any class loaders. This is useful in cases where class loaders are thrown away to implement class reloading.

For more details see PropertyUtilsBean.


See Also:   PropertyUtilsBean.clearDescriptors
See Also:   



copyProperties
public static void copyProperties(Object dest, Object orig) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Copy property values from the "origin" bean to the "destination" bean for all cases where the property names are the same (even though the actual getter and setter methods might have been customized via BeanInfo classes).

For more details see PropertyUtilsBean.


Parameters:
  dest - Destination bean whose properties are modified
Parameters:
  orig - Origin bean whose properties are retrieved
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if the dest ororig argument is null
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.copyProperties
See Also:   



describe
public static Map describe(Object bean) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Return the entire set of properties for which the specified bean provides a read method.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose properties are to be extracted The set of properties for the bean
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean is null
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.describe
See Also:   



getDebug
public static int getDebug()(Code)
The debug static property is no longer used debug property



getIndexedProperty
public static Object getIndexedProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Return the value of the specified indexed property of the specified bean, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be extracted
Parameters:
  name - propertyname[index] of the property valueto be extracted the indexed property value
exception:
  IndexOutOfBoundsException - if the specified indexis outside the valid range for the underlying property
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean orname is null
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.getIndexedProperty(ObjectString)
See Also:   



getIndexedProperty
public static Object getIndexedProperty(Object bean, String name, int index) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Return the value of the specified indexed property of the specified bean, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be extracted
Parameters:
  name - Simple property name of the property value to be extracted
Parameters:
  index - Index of the property value to be extracted the indexed property value
exception:
  IndexOutOfBoundsException - if the specified indexis outside the valid range for the underlying property
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean orname is null
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.getIndexedProperty(ObjectStringint)
See Also:   



getMappedProperty
public static Object getMappedProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Return the value of the specified mapped property of the specified bean, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be extracted
Parameters:
  name - propertyname(key) of the property valueto be extracted the mapped property value
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.getMappedProperty(ObjectString)
See Also:   



getMappedProperty
public static Object getMappedProperty(Object bean, String name, String key) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Return the value of the specified mapped property of the specified bean, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be extracted
Parameters:
  name - Mapped property name of the property value to be extracted
Parameters:
  key - Key of the property value to be extracted the mapped property value
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.getMappedProperty(ObjectStringString)
See Also:   



getMappedPropertyDescriptors
public static FastHashMap getMappedPropertyDescriptors(Class beanClass)(Code)

Return the mapped property descriptors for this bean class.

For more details see PropertyUtilsBean.


Parameters:
  beanClass - Bean class to be introspected the mapped property descriptors
See Also:   PropertyUtilsBean.getMappedPropertyDescriptors(Class)



getMappedPropertyDescriptors
public static FastHashMap getMappedPropertyDescriptors(Object bean)(Code)

Return the mapped property descriptors for this bean.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean to be introspected the mapped property descriptors
See Also:   PropertyUtilsBean.getMappedPropertyDescriptors(Object)



getNestedProperty
public static Object getNestedProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Return the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be extracted
Parameters:
  name - Possibly nested name of the property to be extracted the nested property value
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean orname is null
exception:
  NestedNullException - if a nested reference to aproperty returns null
exception:
  InvocationTargetException - if the property accessor method throws an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.getNestedProperty



getProperty
public static Object getProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Return the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be extracted
Parameters:
  name - Possibly indexed and/or nested name of the propertyto be extracted the property value
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean orname is null
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.getProperty



getPropertyDescriptor
public static PropertyDescriptor getPropertyDescriptor(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Retrieve the property descriptor for the specified property of the specified bean, or return null if there is no such descriptor.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean for which a property descriptor is requested
Parameters:
  name - Possibly indexed and/or nested name of the property forwhich a property descriptor is requested the property descriptor
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean orname is null
exception:
  IllegalArgumentException - if a nested reference to aproperty returns null
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.getPropertyDescriptor



getPropertyDescriptors
public static PropertyDescriptor[] getPropertyDescriptors(Class beanClass)(Code)

Retrieve the property descriptors for the specified class, introspecting and caching them the first time a particular bean class is encountered.

For more details see PropertyUtilsBean.


Parameters:
  beanClass - Bean class for which property descriptors are requested the property descriptors
exception:
  IllegalArgumentException - if beanClass is null
See Also:   PropertyUtilsBean.getPropertyDescriptors(Class)



getPropertyDescriptors
public static PropertyDescriptor[] getPropertyDescriptors(Object bean)(Code)

Retrieve the property descriptors for the specified bean, introspecting and caching them the first time a particular bean class is encountered.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean for which property descriptors are requested the property descriptors
exception:
  IllegalArgumentException - if bean is null
See Also:   PropertyUtilsBean.getPropertyDescriptors(Object)



getPropertyEditorClass
public static Class getPropertyEditorClass(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Return the Java Class repesenting the property editor class that has been registered for this property (if any).

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean for which a property descriptor is requested
Parameters:
  name - Possibly indexed and/or nested name of the property forwhich a property descriptor is requested the property editor class
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean orname is null
exception:
  IllegalArgumentException - if a nested reference to aproperty returns null
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.getPropertyEditorClass(ObjectString)



getPropertyType
public static Class getPropertyType(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Return the Java Class representing the property type of the specified property, or null if there is no such property for the specified bean.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean for which a property descriptor is requested
Parameters:
  name - Possibly indexed and/or nested name of the property forwhich a property descriptor is requested The property type
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean orname is null
exception:
  IllegalArgumentException - if a nested reference to aproperty returns null
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.getPropertyType(ObjectString)



getReadMethod
public static Method getReadMethod(PropertyDescriptor descriptor)(Code)

Return an accessible property getter method for this property, if there is one; otherwise return null.

For more details see PropertyUtilsBean.


Parameters:
  descriptor - Property descriptor to return a getter for The read method
See Also:   PropertyUtilsBean.getReadMethod



getSimpleProperty
public static Object getSimpleProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Return the value of the specified simple property of the specified bean, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be extracted
Parameters:
  name - Name of the property to be extracted The property value
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean orname is null
exception:
  IllegalArgumentException - if the property nameis nested or indexed
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.getSimpleProperty



getWriteMethod
public static Method getWriteMethod(PropertyDescriptor descriptor)(Code)

Return an accessible property setter method for this property, if there is one; otherwise return null.

For more details see PropertyUtilsBean.


Parameters:
  descriptor - Property descriptor to return a setter for The write method
See Also:   PropertyUtilsBean.getWriteMethod



isReadable
public static boolean isReadable(Object bean, String name)(Code)

Return true if the specified property name identifies a readable property on the specified bean; otherwise, return false.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean to be examined (may be a DynaBean
Parameters:
  name - Property name to be evaluated true if the property is readable,otherwise false
exception:
  IllegalArgumentException - if beanor name is null
See Also:   PropertyUtilsBean.isReadable
since:
   BeanUtils 1.6



isWriteable
public static boolean isWriteable(Object bean, String name)(Code)

Return true if the specified property name identifies a writeable property on the specified bean; otherwise, return false.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean to be examined (may be a DynaBean
Parameters:
  name - Property name to be evaluated true if the property is writeable,otherwise false
exception:
  IllegalArgumentException - if beanor name is null
See Also:   PropertyUtilsBean.isWriteable
since:
   BeanUtils 1.6



setDebug
public static void setDebug(int newDebug)(Code)
The debug static property is no longer used
Parameters:
  newDebug - debug property



setIndexedProperty
public static void setIndexedProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Sets the value of the specified indexed property of the specified bean, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be modified
Parameters:
  name - propertyname[index] of the property valueto be modified
Parameters:
  value - Value to which the specified property elementshould be set
exception:
  IndexOutOfBoundsException - if the specified indexis outside the valid range for the underlying property
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean orname is null
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.setIndexedProperty(ObjectStringObject)



setIndexedProperty
public static void setIndexedProperty(Object bean, String name, int index, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Sets the value of the specified indexed property of the specified bean, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be set
Parameters:
  name - Simple property name of the property value to be set
Parameters:
  index - Index of the property value to be set
Parameters:
  value - Value to which the indexed property element is to be set
exception:
  IndexOutOfBoundsException - if the specified indexis outside the valid range for the underlying property
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean orname is null
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.setIndexedProperty(ObjectStringObject)



setMappedProperty
public static void setMappedProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Sets the value of the specified mapped property of the specified bean, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be set
Parameters:
  name - propertyname(key) of the property valueto be set
Parameters:
  value - The property value to be set
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.setMappedProperty(ObjectStringObject)



setMappedProperty
public static void setMappedProperty(Object bean, String name, String key, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Sets the value of the specified mapped property of the specified bean, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be set
Parameters:
  name - Mapped property name of the property value to be set
Parameters:
  key - Key of the property value to be set
Parameters:
  value - The property value to be set
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.setMappedProperty(ObjectStringStringObject)



setNestedProperty
public static void setNestedProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Sets the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be modified
Parameters:
  name - Possibly nested name of the property to be modified
Parameters:
  value - Value to which the property is to be set
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean orname is null
exception:
  IllegalArgumentException - if a nested reference to aproperty returns null
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.setNestedProperty



setProperty
public static void setProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Set the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be modified
Parameters:
  name - Possibly indexed and/or nested name of the propertyto be modified
Parameters:
  value - Value to which this property is to be set
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean orname is null
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.setProperty



setSimpleProperty
public static void setSimpleProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)

Set the value of the specified simple property of the specified bean, with no type conversions.

For more details see PropertyUtilsBean.


Parameters:
  bean - Bean whose property is to be modified
Parameters:
  name - Name of the property to be modified
Parameters:
  value - Value to which the property should be set
exception:
  IllegalAccessException - if the caller does not haveaccess to the property accessor method
exception:
  IllegalArgumentException - if bean orname is null
exception:
  IllegalArgumentException - if the property name isnested or indexed
exception:
  InvocationTargetException - if the property accessor methodthrows an exception
exception:
  NoSuchMethodException - if an accessor method for thispropety cannot be found
See Also:   PropertyUtilsBean.setSimpleProperty



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.