commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Inger, Matthew" <In...@Synygy.com>
Subject RE: [betwixt] Writing Map entries issue
Date Wed, 02 Jun 2004 21:27:42 GMT
PS:  This is not that big of a deal to me, as i'm using betwixt
in conjunction with XMLUnit to do regression testing.  The basic
thrust of what i'm doing:

1.  Write control object to XML file using betwixt
2.  Write test object to XML using betwixt
3.  Compare the control and test object XML using XMLUnit,
    allowing exclusions of differences based on XPath expressions

So, as long as the map writing is consistent, it doesn't affect
what i'm doing, but fir betwixt, as a product, I think that issue (and the
issue
of subclasses in general) has to be addressed at some point.  By subclasses
I mean:

   1.  properties which have an abstract type, or return a different
       actual class than the declared type.
   2.  Secondly, the inheritance issue, which you and i have been
discussing.

Perhaps it would be possible that if any object has a different actual type
than what the property is declared a (Object is assumed for things like
Map.Entry), then a "class" attribute is added:

<HashMap>
 <entry>
  <key class="java.lang.String">6</key>
  <entry class="com.someone.MyBean">...</entry>
 </entry>
</HashMap>

a relatively clean approach IMHO.  If these are not addressed, i don't see
the read functionality being of much use for complex beans.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message