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

1 view (last 30 days)
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

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
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

Find more on Java Package Integration in Help Center and File Exchange

Products


Release

R2008a

Community Treasure Hunt

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

Start Hunting!