Joel VanderWerf 2012-05-17, 18:54
On 05/17/2012 11:54 AM, Joel VanderWerf wrote:
> I'd like to subclass the avro-generated classes.
> Is it possible to tell avro to deserialize using a custom builder that
> instantiates my subclasses?
> There are some hints in the source code that this might be possible, but
> what I'd really like is a small, working example...
This may be what I'm looking for:
The getClass() method perhaps can be overridden to map incoming record
class names to java classes. Not sure if this is the right way to do it
though. There's also a getClassName() which might be a better method to
What we are trying to do is emulate JAXB's ObjectFactory
functionality, which lets you specify which subclasses of the
generated classes are used for deserialization.
Doug Cutting 2012-06-06, 17:16