I do a serializer-deserializer in xml. I have such a class in some package
@XMLAlias("organization") public static class Organization{ ... } Annotation code:
@Target({ElementType.FIELD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface XMLAlias { String value(); } Correspondingly, if the abstract is present in the serializer code, the class name in the final xml document is replaced with the annotation value, in this case <organization> . I can’t figure out how to deserialize me to find in runtime the original class name (which consists of a package + the class name itself),
test.Organizationby the value of theXMLAliasannotationXMLAlias? - RegentgetTypesAnnotatedWithmethod that returns a set of classes that have this annotation. Here among this set and you will need to search. I have never used this library, so I cannot give a complete answer. - Regent