Java Doc for BeanUtils.java in  » Swing-Library » jgoodies-data-binding » com » jgoodies » binding » beans » 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 » Swing Library » jgoodies data binding » com.jgoodies.binding.beans 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jgoodies.binding.beans.BeanUtils

BeanUtils
final public class BeanUtils (Code)
Consists exclusively of static methods that provide convenience behavior for working with Java Bean properties.
author:
   Karsten Lentzsch
version:
   $Revision: 1.12 $
See Also:   Introspector
See Also:   BeanInfo
See Also:   PropertyDescriptor




Method Summary
public static  voidaddPropertyChangeListener(Object bean, Class beanClass, PropertyChangeListener listener)
     Adds a property change listener to the given bean.
public static  voidaddPropertyChangeListener(Object bean, Class beanClass, String propertyName, PropertyChangeListener listener)
     Adds a named property change listener to the given bean.
public static  voidaddPropertyChangeListener(Object bean, PropertyChangeListener listener)
     Adds a property change listener to the given bean.
public static  voidaddPropertyChangeListener(Object bean, String propertyName, PropertyChangeListener listener)
     Adds a named property change listener to the given bean.
public static  MethodgetNamedPCLAdder(Class clazz)
     Looks up and returns the method that adds a PropertyChangeListener for a specified property name to instances of the given class.
public static  MethodgetNamedPCLRemover(Class clazz)
     Looks up and returns the method that removes a PropertyChangeListener for a specified property name from instances of the given class.
public static  MethodgetPCLAdder(Class clazz)
     Looks up and returns the method that adds a multicast PropertyChangeListener to instances of the given class.
public static  MethodgetPCLRemover(Class clazz)
     Looks up and returns the method that removes a multicast PropertyChangeListener from instances of the given class.
public static  PropertyDescriptorgetPropertyDescriptor(Class beanClass, String propertyName)
     Looks up and returns a PropertyDescriptor for the given Java Bean class and property name using the standard Java Bean introspection behavior.
public static  PropertyDescriptorgetPropertyDescriptor(Class beanClass, String propertyName, String getterName, String setterName)
     Looks up and returns a PropertyDescriptor for the given Java Bean class and property name.
public static  ObjectgetValue(Object bean, PropertyDescriptor propertyDescriptor)
     Returns the value of the specified property of the given non-null bean.
public static  voidremovePropertyChangeListener(Object bean, Class beanClass, PropertyChangeListener listener)
     Removes a property change listener from the given bean.
public static  voidremovePropertyChangeListener(Object bean, Class beanClass, String propertyName, PropertyChangeListener listener)
     Removes a named property change listener from the given bean.
public static  voidremovePropertyChangeListener(Object bean, PropertyChangeListener listener)
     Removes a property change listener from the given bean.
public static  voidremovePropertyChangeListener(Object bean, String propertyName, PropertyChangeListener listener)
     Removes a named property change listener from the given bean.
public static  voidsetValue(Object bean, PropertyDescriptor propertyDescriptor, Object newValue)
     Sets the given object as new value of the specified property of the given non-null bean.
public static  booleansupportsBoundProperties(Class clazz)
     Checks and answers whether the given class supports bound properties, i.e.



Method Detail
addPropertyChangeListener
public static void addPropertyChangeListener(Object bean, Class beanClass, PropertyChangeListener listener)(Code)
Adds a property change listener to the given bean. First checks whether the bean supports bound properties, i.e. it provides a pair of methods to register multicast property change event listeners; see section 7.4.1 of the Java Beans specification for details.
Parameters:
  bean - the bean to add the property change listener to
Parameters:
  beanClass - the Bean class used to lookup methods from
Parameters:
  listener - the listener to add
throws:
  NullPointerException - if the bean or listener is null
throws:
  IllegalArgumentException - if the bean is not an instance of the bean class
throws:
  PropertyUnboundException - if the bean does not support bound properties
throws:
  PropertyNotBindableException - if the property change handler cannot be added successfully
since:
   1.1.1



addPropertyChangeListener
public static void addPropertyChangeListener(Object bean, Class beanClass, String propertyName, PropertyChangeListener listener)(Code)
Adds a named property change listener to the given bean. The bean must provide the optional support for listening on named properties as described in section 7.4.5 of the Java Bean Specification. The bean class must provide the method:
 public void addPropertyChangeListener(String name, PropertyChangeListener l);
 

Parameters:
  bean - the bean to add a property change handler
Parameters:
  beanClass - the Bean class used to lookup methods from
Parameters:
  propertyName - the name of the property to be observed
Parameters:
  listener - the listener to add
throws:
  NullPointerException - if the bean, propertyName or listener is null
throws:
  IllegalArgumentException - if the bean is not an instance of the bean class
throws:
  PropertyNotBindableException - if the property change handler cannot be added successfully



addPropertyChangeListener
public static void addPropertyChangeListener(Object bean, PropertyChangeListener listener)(Code)
Adds a property change listener to the given bean. First checks whether the bean supports bound properties, i.e. it provides a pair of methods to register multicast property change event listeners; see section 7.4.1 of the Java Beans specification for details.
Parameters:
  bean - the bean to add the property change listener to
Parameters:
  listener - the listener to add
throws:
  NullPointerException - if the bean or listener is null
throws:
  PropertyUnboundException - if the bean does not support bound properties
throws:
  PropertyNotBindableException - if the property change handler cannot be added successfully



addPropertyChangeListener
public static void addPropertyChangeListener(Object bean, String propertyName, PropertyChangeListener listener)(Code)
Adds a named property change listener to the given bean. The bean must provide the optional support for listening on named properties as described in section 7.4.5 of the Java Bean Specification. The bean class must provide the method:
 public void addPropertyChangeListener(String name, PropertyChangeListener l);
 

Parameters:
  bean - the bean to add a property change handler
Parameters:
  propertyName - the name of the property to be observed
Parameters:
  listener - the listener to add
throws:
  NullPointerException - if the bean, propertyName or listener is null
throws:
  PropertyNotBindableException - if the property change handler cannot be added successfully



getNamedPCLAdder
public static Method getNamedPCLAdder(Class clazz)(Code)
Looks up and returns the method that adds a PropertyChangeListener for a specified property name to instances of the given class.
Parameters:
  clazz - the class that provides the adder method the method that adds the PropertyChangeListeners



getNamedPCLRemover
public static Method getNamedPCLRemover(Class clazz)(Code)
Looks up and returns the method that removes a PropertyChangeListener for a specified property name from instances of the given class.
Parameters:
  clazz - the class that provides the remover method the method that removes the PropertyChangeListeners



getPCLAdder
public static Method getPCLAdder(Class clazz)(Code)
Looks up and returns the method that adds a multicast PropertyChangeListener to instances of the given class.
Parameters:
  clazz - the class that provides the adder method the method that adds multicast PropertyChangeListeners



getPCLRemover
public static Method getPCLRemover(Class clazz)(Code)
Looks up and returns the method that removes a multicast PropertyChangeListener from instances of the given class.
Parameters:
  clazz - the class that provides the remover method the method that removes multicast PropertyChangeListeners



getPropertyDescriptor
public static PropertyDescriptor getPropertyDescriptor(Class beanClass, String propertyName) throws IntrospectionException(Code)
Looks up and returns a PropertyDescriptor for the given Java Bean class and property name using the standard Java Bean introspection behavior.
Parameters:
  beanClass - the type of the bean that holds the property
Parameters:
  propertyName - the name of the Bean property the PropertyDescriptor associated with the givenbean and property name as returned by the Bean introspection
throws:
  IntrospectionException - if an exception occurs duringintrospection.
throws:
  NullPointerException - if the beanClass or propertyName is null
since:
   1.1.1



getPropertyDescriptor
public static PropertyDescriptor getPropertyDescriptor(Class beanClass, String propertyName, String getterName, String setterName)(Code)
Looks up and returns a PropertyDescriptor for the given Java Bean class and property name. If a getter name or setter name is available, these are used to create a PropertyDescriptor. Otherwise, the standard Java Bean introspection is used to determine the property descriptor.
Parameters:
  beanClass - the class of the bean that holds the property
Parameters:
  propertyName - the name of the property to be accessed
Parameters:
  getterName - the optional name of the property's getter
Parameters:
  setterName - the optional name of the property's setter the PropertyDescriptor associated with thegiven bean and property name
throws:
  PropertyNotFoundException - if the property could not be found
since:
   1.1.1



getValue
public static Object getValue(Object bean, PropertyDescriptor propertyDescriptor)(Code)
Returns the value of the specified property of the given non-null bean. This operation is unsupported if the bean property is read-only.

If the read access fails, a PropertyAccessException is thrown that provides the Throwable that caused the failure.
Parameters:
  bean - the bean to read the value from
Parameters:
  propertyDescriptor - describes the property to be read the bean's property value
throws:
  NullPointerException - if the bean is null
throws:
  UnsupportedOperationException - if the bean property is write-only
throws:
  PropertyAccessException - if the new value could not be read




removePropertyChangeListener
public static void removePropertyChangeListener(Object bean, Class beanClass, PropertyChangeListener listener)(Code)
Removes a property change listener from the given bean.
Parameters:
  bean - the bean to remove the property change listener from
Parameters:
  beanClass - the Java Bean class used to lookup methods from
Parameters:
  listener - the listener to remove
throws:
  NullPointerException - if the bean or listener is null
throws:
  IllegalArgumentException - if the bean is not an instance of the bean class
throws:
  PropertyUnboundException - if the bean does not support bound properties
throws:
  PropertyNotBindableException - if the property change handler cannot be removed successfully
since:
   1.1.1



removePropertyChangeListener
public static void removePropertyChangeListener(Object bean, Class beanClass, String propertyName, PropertyChangeListener listener)(Code)
Removes a named property change listener from the given bean. The bean must provide the optional support for listening on named properties as described in section 7.4.5 of the Java Bean Specification. The bean class must provide the method:
 public void removePropertyChangeHandler(String name, PropertyChangeListener l);
 

Parameters:
  bean - the bean to remove the property change listener from
Parameters:
  beanClass - the Java Bean class used to lookup methods from
Parameters:
  propertyName - the name of the observed property
Parameters:
  listener - the listener to remove
throws:
  NullPointerException - if the bean, propertyName, or listener is null
throws:
  IllegalArgumentException - if the bean is not an instance of the bean class
throws:
  PropertyNotBindableException - if the property change handler cannot be removed successfully
since:
   1.1.1



removePropertyChangeListener
public static void removePropertyChangeListener(Object bean, PropertyChangeListener listener)(Code)
Removes a property change listener from the given bean.
Parameters:
  bean - the bean to remove the property change listener from
Parameters:
  listener - the listener to remove
throws:
  NullPointerException - if the bean or listener is null
throws:
  PropertyUnboundException - if the bean does not support bound properties
throws:
  PropertyNotBindableException - if the property change handler cannot be removed successfully



removePropertyChangeListener
public static void removePropertyChangeListener(Object bean, String propertyName, PropertyChangeListener listener)(Code)
Removes a named property change listener from the given bean. The bean must provide the optional support for listening on named properties as described in section 7.4.5 of the Java Bean Specification. The bean class must provide the method:
 public void removePropertyChangeHandler(String name, PropertyChangeListener l);
 

Parameters:
  bean - the bean to remove the property change listener from
Parameters:
  propertyName - the name of the observed property
Parameters:
  listener - the listener to remove
throws:
  NullPointerException - if the bean, propertyName, or listener is null
throws:
  PropertyNotBindableException - if the property change handler cannot be removed successfully



setValue
public static void setValue(Object bean, PropertyDescriptor propertyDescriptor, Object newValue) throws PropertyVetoException(Code)
Sets the given object as new value of the specified property of the given non-null bean. This is unsupported if the bean property is read-only.

If the write access fails, a PropertyAccessException is thrown that provides the Throwable that caused the failure. If the bean property is constrained and a VetoableChangeListener has vetoed against the value change, the PropertyAccessException wraps the PropertyVetoException thrown by the setter.
Parameters:
  bean - the bean that holds the adapted property
Parameters:
  propertyDescriptor - describes the property to be set
Parameters:
  newValue - the property value to be set
throws:
  NullPointerException - if the bean is null
throws:
  UnsupportedOperationException - if the bean property is read-only
throws:
  PropertyAccessException - if the new value could not be set
throws:
  PropertyVetoException - if the bean setter throws this exception




supportsBoundProperties
public static boolean supportsBoundProperties(Class clazz)(Code)
Checks and answers whether the given class supports bound properties, i.e. it provides a pair of multicast event listener registration methods for PropertyChangeListeners:
 public void addPropertyChangeListener(PropertyChangeListener x);
 public void removePropertyChangeListener(PropertyChangeListener x);
 

Parameters:
  clazz - the class to test true if the class supports bound properties, false otherwise



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.