Java BeanUtils Tutorial
Standard JavaBeans
Dynamic Beans (DynaBeans)
Data Type Conversions
Utility Objects & Classes
Collections
Java BeanUtils Useful Resources
Selected Reading
Standard JavaBeans
- Suppressing Properties
- Customizing Introspection
- Nested Property Access
- Basic Property Access
- Background
Dynamic Beans (DynaBeans)
Data Type Conversions
Utility Objects & Classes
Collections
Java BeanUtils Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
WrapDynaBean
Java BeanUtils - WrapDynaBean
Description
As we have seen in the previous chapters, DynaBeans APIs provides get() and set() methods to access simple, indexed and mapped properties of DynaBeans dynamically. Instead of this, you can use the existing standard JavaBeans classes to access all beans by using the WrapDynaBean and WrapDynaClass. As the name itself indicates WrapDynaBean class is used to wrap the DynaBean APIs throughout the existing JavaBean class.
To make use of the WrapDynaBean class, create the wrapper as shown in the below simple code:
BeanDemo bean = ...; DynaBean wrapper = new WrapDynaBean(bean); String yourName = wrapper.get("yourName");Advertisements