How do I use the static methods 'fromBean' and 'fromMap' of the MWStructArray class defined for MATLAB Builder JA (R2008a)?

The MATLAB Builder JA (R2008a) documentation mentions methods 'fromBean' and 'fromMap' for MWStructArray class but does not provide examples on how to use them.

 Accepted Answer

The attached files “SampleBean.java” and “MapAndBeanToMWStruct.java” illustrate how to use MWStructArray.fromBean and MWStructArray.fromMap methods.
“SampleBean.java” is a sample Java bean class. “MapAndBeanToMWStruct.java” shows how to use the 'fromBean' and 'fromMap' methods.
NOTE: For the 'fromBean' method, the user should ignore the field class with the value 0 in the MWStructArray. This shows up because of the inherited getClass() method of all classes.

More Answers (0)

Categories

Products

Release

R2008a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!