Fri 08 Aug 2008
Fri 09 Nov 2007
Dear JRoller Community,
I'm pleased to announce that EZMorph version 1.0.4 has been released.
Download | Documentation | Faq | Changes
EZMorph is simple java library for transforming an Object to another Object.
Additions
I'm pleased to announce that EZMorph version 1.0.4 has been released.
Download | Documentation | Faq | Changes
EZMorph is simple java library for transforming an Object to another Object.
Additions
Added List assertions to ArrayAssetions. Added SwitchingMorpher. Added ObjectListMorpher. Added MapToDateMorpher.
Fixes
Wed 07 Nov 2007
It's been a little while since I blogged about EZMorph because there wasn't much to say. But recent events have changed that. In what seems to be a coincidence in time there have been a couple of messages both on EZmorph's and Json-lib's forums related to Morphers.
From Json-lib, a user needs a way to transform a JSONObject (or Map) into a java.util.Date, knowing that the object has all the required properties (if you didn't know, Dates can be translated into a JSONObject in the same way as any bean); so this is the reverse case, but somehow the MorpherRegistry wasn't working as expected and called the wrong Morpher. This turned out to be a bug in MorpherRegistry and also sprung a new morpher: MapToDateMorpher, which as the name implies it will try its best to morph a Map into a Date. All properties are optional, any key that is missing will assign zero (0) to the corresponding property on the resulting Date object, and as with many Morphers it accepts a defaultValue to be used if the Map is null or empty.
From EZMorph, another user had some problems morphing a List of objects into another List depending on the contents of the first one, for example if the first list has XA and XB instances the second list should have YA and YB respectively. This is a case for a base ListMorpher with a composed 'intelligent" Morpher that knows how to map each class, which is similar to what ObjectArrayMorpher offers now but with Lists, right? This requirement added ObjectListMorpher and SwitchingMorpher to the list of available Morphers you can configure. This also means that assertions on Lists should be provided, that is why ArrayAssertions now has two methods for such a job.
Speaking of ArrayAssertions, some of its methods may be redundant if working with JUnit4 (because it _finally_ has array support), but it is also capable of trying its best to match Double[] with double[] or even Double[]/double[] with Object[] and vice versa (when you care about values, not types). And by the way, ArrayAssertions also works with n-dimensional arrays, something I think is still missing in the JUnit4 version (have to confirm though).
I'm still waiting for confirmation on the users if the fixes solve their needs, if so then EZMorph-1.0.4 should be released soon, which means Json-lib will also have a release (2.2) in the following weeks (because of bug fixes and new features too).
ezmorph features java
From Json-lib, a user needs a way to transform a JSONObject (or Map) into a java.util.Date, knowing that the object has all the required properties (if you didn't know, Dates can be translated into a JSONObject in the same way as any bean); so this is the reverse case, but somehow the MorpherRegistry wasn't working as expected and called the wrong Morpher. This turned out to be a bug in MorpherRegistry and also sprung a new morpher: MapToDateMorpher, which as the name implies it will try its best to morph a Map into a Date. All properties are optional, any key that is missing will assign zero (0) to the corresponding property on the resulting Date object, and as with many Morphers it accepts a defaultValue to be used if the Map is null or empty.
From EZMorph, another user had some problems morphing a List of objects into another List depending on the contents of the first one, for example if the first list has XA and XB instances the second list should have YA and YB respectively. This is a case for a base ListMorpher with a composed 'intelligent" Morpher that knows how to map each class, which is similar to what ObjectArrayMorpher offers now but with Lists, right? This requirement added ObjectListMorpher and SwitchingMorpher to the list of available Morphers you can configure. This also means that assertions on Lists should be provided, that is why ArrayAssertions now has two methods for such a job.
Speaking of ArrayAssertions, some of its methods may be redundant if working with JUnit4 (because it _finally_ has array support), but it is also capable of trying its best to match Double[] with double[] or even Double[]/double[] with Object[] and vice versa (when you care about values, not types). And by the way, ArrayAssertions also works with n-dimensional arrays, something I think is still missing in the JUnit4 version (have to confirm though).
I'm still waiting for confirmation on the users if the fixes solve their needs, if so then EZMorph-1.0.4 should be released soon, which means Json-lib will also have a release (2.2) in the following weeks (because of bug fixes and new features too).
ezmorph features java
Wed 01 Aug 2007
Dear JRoller Community,
I'm pleased to announce that EZMorph version 1.0.3 has been released.
Download | Documentation | Faq | Changes
EZMorph is simple java library for transforming an Object to another Object.
Updates
ezmorph release
I'm pleased to announce that EZMorph version 1.0.3 has been released.
Download | Documentation | Faq | Changes
EZMorph is simple java library for transforming an Object to another Object.
Updates
Updated javadocs
Fixes
1765637 Override registered morphers when registering a new one
ezmorph release
Sat 14 Apr 2007
Dear JRoller Community,
I'm pleased to announce that EZMorph version 1.0.2 has been released.
Download | Documentation | Faq | Changes
EZMorph is simple java library for transforming an Object to another Object.
+ Fixes
ezmorph release
I'm pleased to announce that EZMorph version 1.0.2 has been released.
Download | Documentation | Faq | Changes
EZMorph is simple java library for transforming an Object to another Object.
+ Fixes
1698868 NPE on BeanMorpher. Caused when target bean has a property that source bean does not.
ezmorph release
Sun 11 Feb 2007
Dear JRoller Community,
I'm pleased to announce that EZMorph version 1.0.1 has been released.
Download | Documentation | Faq | Changes
EZMorph is simple java library for transforming an Object to another Object.
Fixes
ezmorph release
I'm pleased to announce that EZMorph version 1.0.1 has been released.
Download | Documentation | Faq | Changes
EZMorph is simple java library for transforming an Object to another Object.
Fixes
1651911. Add number support for BooleanMorpher. 1648093. Can not create an empty MorphDynaBean.
ezmorph release
About me











![[image]](http://mowser.com/img?url=http%3A%2F%2Fjroller.com%2Fresources%2Fa%2Faalmiray%2Fimtd4.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Fjroller.com%2Fresources%2Fa%2Faalmiray%2Frss_weblogs.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Fwww.blogburst.com%2FResources%2FImages%2Fblogburst_80x15.gif%3Fid%3DB8FvOsgxNdOKCYKtvrW8bRD)
![[image]](http://mowser.com/img?url=http%3A%2F%2Fwww.javablogs.com%2Fimages%2Fjavablog-small.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Fjroller.com%2Fresources%2Fa%2Faalmiray%2Fgroovyblogs_80x15.png)





