Skip to main content

@XmlJavaTypeAdapter newbie question

2 replies [Last post]
hr_stoyanov
Offline
Joined: 2004-04-01

Hi all,
I was reading Koshuke's blog about @XmlJavaTypeAdapter. My question is how can one provide more of the same annotation at the package level? For example, the following does not work in my package-info.java file:
---------------------------------------------
@XmlJavaTypeAdapter( value=URIXmlAdaptor.class,type=URI.class)
@XmlJavaTypeAdapter(
value=BigDecimalXmlAdapter.class,type=BigDecimal.class})

package com.mypackage;
import com...BigDecimalXmlAdapter;
import com...URIXmlAdaptor;
import java.math.BigDecimal;
import java.net.URI;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hr_stoyanov
Offline
Joined: 2004-04-01

... oops, just saw @XmlJavaTypeAdapters. Sorry!

kohsuke
Offline
Joined: 2003-06-09

Yes, that's it.