if(jsonAnnoation!=null && jsonAnnoation.value()!=null) {
typeToId.put(c, jsonAnnoation.value());
idToType.put(jsonAnnoation.value(), TypeFactory.defaultInstance().constructSpecializedType(baseType, c));
idToType.put(c.getName(), TypeFactory.defaultInstance().constructSpecializedType(baseType, c));
} else {
XmlRootElement xmlAnnoation = c.getAnnotation(XmlRootElement.class);
if(xmlAnnoation!=null && xmlAnnoation.name()!=null) {
typeToId.put(c, xmlAnnoation.name());
idToType.put(xmlAnnoation.name(), TypeFactory.defaultInstance().constructSpecializedType(baseType, c));
idToType.put(c.getName(), TypeFactory.defaultInstance().constructSpecializedType(baseType, c));
}
}
}
}