code: private static boolean attributeHasRestrictions(XsdAttribute attribute){
          List<XsdRestriction> restrictions = getAttributeRestrictions(attribute);
  
          //noinspection SimplifiableIfStatement
          if (restrictions.isEmpty()){
              return false;
          }
  
          return restrictions.stream().anyMatch(XsdAsmAttributes::hasRestrictionsOtherThanEnumeration);
      }
docs: Asserts if the received {@link XsdAttribute} object has restrictions. Enumeration restrictions are discarded
  since they are already validated by the usage of {@link Enum} classses.
  @param attribute The {@link XsdAttribute} object.
  @return Whether the received attribute has restrictions other than {@link XsdEnumeration}.