List<XSAttributeDeclaration> attributes = null;
XSObjectList attributesObjectList = ctypedef.getAttributeUses();
if (0 < attributesObjectList.getLength()) {
List temp = XSListHelper.asList(attributesObjectList);
attributes = new ArrayList<XSAttributeDeclaration>();
CollectionsHelper.copyCollection((Collection<XSAttributeUse>) temp, attributes, new XsAttributeExtractor());
Collections.sort(attributes, new NameComparator());
}
return attributes;
}