if (defaultBaseUri != null) {
uriValue = URI.create(defaultBaseUri).resolve(uriValue).toString();
}
XmlQNameEnum enumInfo = clazz.getAnnotation(XmlQNameEnum.class);
if (enumInfo == null) {
throw new IllegalArgumentException(String.format("Class %s isn't a QName enum.", clazz.getName()));
}
else if (enumInfo.base() != XmlQNameEnum.BaseType.URI) {
throw new IllegalArgumentException("Class " + clazz.getName() + " is supposed to be converted to a QName (not URI).");
}
String namespace = enumInfo.namespace();
if ("##default".equals(namespace)) {
Package pkg = clazz.getPackage();
if (pkg != null) {
XmlSchema schemaInfo = pkg.getAnnotation(XmlSchema.class);
namespace = schemaInfo.namespace();