if (!generateTypesafeEnumClass && pType.isGlobal()) {
XsQName[] qNames = new XsQName[]{XSNMToken.getInstance().getName()};
XSSchema xsSchema = xsType.getXSSchema();
if (xsSchema instanceof JAXBSchema) {
JAXBSchema jaxbSchema = (JAXBSchema) xsSchema;
JAXBGlobalBindings globalBindings = jaxbSchema.getJAXBGlobalBindings();
if (globalBindings != null) {
qNames = globalBindings.getTypesafeEnumBase();
}
}
for (XSType restrType = xsType; !generateTypesafeEnumClass; ) {
restrType = restrType.getSimpleType().getRestrictedType();