if (cls == JAXBElement.class) {
return object != null ? ((JAXBElement)object).getName() : null;
}
XmlRootElement root = cls.getAnnotation(XmlRootElement.class);
QName qname = null;
if (root != null) {
String namespace = getNamespace(root.namespace());
if ("".equals(namespace)) {
String packageNs = JAXBUtils.getPackageNamespace(cls);
if (packageNs != null) {
namespace = getNamespace(packageNs);
}
}
String name = getLocalName(root.name(), cls.getSimpleName(), pluralName);
return new QName(namespace, name);
} else {
JAXBContext context = getJAXBContext(cls, type);
JAXBContextProxy proxy = ReflectionInvokationHandler.createProxyWrapper(context,
JAXBContextProxy.class);