i like how castor provides a default classdescriptor for
the date type where dates are marshaled to an iso 8601-like
string (yyyy-mm-ddThh:mm:ss...)
i think there'd be value to developers being able to
contribute descriptors for similarly common, basic,
and nonconforming classes. for example, a java.awt.Color
could easily have a classdescriptor to marshal it as an
8-character hex string for alpha + rgb channels.
one problem is see with this is that the convention for the
default marshaller to pick up custom class descriptors is by
looking for a class named <classname>Descriptor in the
same package as <classname>.
this of course can't be done for things like java.awt.Color.
1. does castor implement a simple mechanism for defining
classdescriptor resolution rules to the default marshaller?
for example, an xml config file that is ready on startup like:
<classdescriptors>
<descriptor forclass="java.awt.Color">
x
</descriptor>
..
</classdescriptors>
b. or maybe there's a way to define this within a mapping?
i know one can define a field-handler for a specific field.
why not for a class in general?
(as in: <class descriptor="x"> )
2. is there an easy-to-find place with sample code for
how to override default class descriptor resolution
(like in the faq?)
any comments?
thanks! / eitan
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev