// Collect constraints from contained ports.
Iterator ports = portList().iterator();
while (ports.hasNext()) {
Typeable port = (Typeable) ports.next();
result.addAll(port.typeConstraintList());
}
// 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();