@Override
    public List<ReferenceBase> getElements() {
        List<ReferenceBase> allAttributes = new ArrayList<>();

        attributeGroups.forEach(attributeGroup -> allAttributes.addAll(attributeGroup.getElements()));

        allAttributes.addAll(attributes);

        return allAttributes;
    }
@ Override public List < ReferenceBase > getElements ( ) { List < ReferenceBase > allAttributes = new ArrayList < > ( ) ; attributeGroups . forEach ( attributeGroup -> allAttributes . addAll ( attributeGroup . getElements ( ) ) ) ; allAttributes . addAll ( attributes ) ; return allAttributes ; }
@return A list of all {@link XsdAttribute} objects contained in the current {@link XsdAttributeGroup} instance,
either directly or present in its children {@link XsdAttributeGroup} in the
{@link XsdAttributeGroup#attributeGroups} field.