Hi Remko,

Remko Tronçon wrote:

> Hi Jörg,
> 
> On 11 September 2013 01:19, Jörg Schaible
> <[email protected]> wrote:
>> Look at the converter tutorial. The last example at the end will do this
>> also.
> 
> It seems I'm still missing a piece of the puzzle. When unmarshalling
> an optional, I need to know the type to pass to convertAnother() for
> unmarshalling the contained value. All
> Unmarhsalingcontext.getRequiredtype() gives me is 'Optional', not the
> actual type parameter. I tried doing this through reflection, but all
> HierarchicalStreamReader can give me is a hint what the field name is,
> not which class i need to look in. I also tried
> 'UnmarshalingContext.currentObject()', but this is null.
>
> Am I missing something?

UnmarshalingContext.getRequiredType contains normally the correct thing. 
Question is, why does it not do it for you? What else have you configured 
(using XStream methods or annotations) for the Optional types?

- Jörg



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to