Heyho,
i’m currently having problems with the JAXB serialization process.
jaxb version 2, used for serialization properties.
Is it possible to add multiple package level annotations in “package-info.class”? Currently i’m creating this file manually, there’s already one “adapter entry” in it and it has to stay there. Although i’m searching like an idiot, every example is with just one entry, but i guess that’s just not possible, because the semantic should be more flexible, allowing multiple package level annotations than just one.
The problem is, that i’m using a @XmlJavaTypeAdapter(AdapterForMap.class) on every map-member in a class, but the map actually contains another type (as value), let’s say Font, which needs to have a appropriate xml adapter. At the moment i’m not able to use this Font-Adapter-like, because ‘package-info.class’ already has one entry.
thanks in advance! 🙂
The
@XmlJavaTypeAdapterscan be used at the package level to register many instances of@XmlJavaTypeAdapter.package-info
For a Complete Example