// Collect constraints from instances of ScopeExtender,
// such as ScopeExtendingAttribute.
Iterator extenders = attributeList(ScopeExtender.class).iterator();
while (extenders.hasNext()) {
ScopeExtender extender = (ScopeExtender) extenders.next();
Iterator extenderAttributes = extender.attributeList()
.iterator();
while (extenderAttributes.hasNext()) {
Attribute extenderAttribute = (Attribute) extenderAttributes
.next();
if (extenderAttribute instanceof Variable) {