Property
property = clazz.getOwnedAttribute("myProperty");
// instead of
Property
property = null;
for (Iterator attributes =
clazz.getOwnedAttributes().iterator();
attributes.hasNext();) {
Property attribute = (Property)
attributes.next();
if ("myProperty".equals(attribute.getName()))
{
property = attribute;
break;
}
}