// Collect constraints from contained attributes.
Iterator typeables = attributeList(Typeable.class).iterator();
while (typeables.hasNext()) {
Typeable typeable = (Typeable) typeables.next();
result.addAll(typeable.typeConstraintList());
}
// Collect constraints from instances of ScopeExtender,
// such as ScopeExtendingAttribute.
Iterator extenders = attributeList(ScopeExtender.class).iterator();