Search in sources :

Example 1 with Attribute

use of org.camunda.bpm.model.xml.type.attribute.Attribute in project camunda-xml-model by camunda.

the class ModelElementTypeImpl method getAllAttributes.

/**
 * Returns a list of all attributes, including the attributes of all base types.
 *
 * @return the list of all attributes
 */
public Collection<Attribute<?>> getAllAttributes() {
    List<Attribute<?>> allAttributes = new ArrayList<Attribute<?>>();
    allAttributes.addAll(getAttributes());
    Collection<ModelElementType> baseTypes = ModelUtil.calculateAllBaseTypes(this);
    for (ModelElementType baseType : baseTypes) {
        allAttributes.addAll(baseType.getAttributes());
    }
    return allAttributes;
}
Also used : ModelElementType(org.camunda.bpm.model.xml.type.ModelElementType) Attribute(org.camunda.bpm.model.xml.type.attribute.Attribute) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 ModelElementType (org.camunda.bpm.model.xml.type.ModelElementType)1 Attribute (org.camunda.bpm.model.xml.type.attribute.Attribute)1