return object != null ? ((JAXBElement)object).getName() : null;
}
XmlRootElement root = cls.getAnnotation(XmlRootElement.class);
if (root != null) {
return getQNameFromNamespaceAndName(root.namespace(), root.name(), cls, pluralName);
} else if (cls.getAnnotation(XmlType.class) != null) {
XmlType xmlType = cls.getAnnotation(XmlType.class);
return getQNameFromNamespaceAndName(xmlType.namespace(), xmlType.name(), cls, pluralName);
} else {
return new QName(getPackageNamespace(cls), cls.getSimpleName());