Search in sources :

Example 6 with LinearizationDef

use of com.rockwellcollins.atc.agree.agree.LinearizationDef in project AGREE by loonwerks.

the class AgreeValidator method getParentNames.

private Set<String> getParentNames(ComponentImplementation ci) {
    Set<String> result = new HashSet<>();
    ComponentType ct = ci.getType();
    for (AgreeSubclause subclause : EcoreUtil2.getAllContentsOfType(ct, AgreeSubclause.class)) {
        List<NamedElement> es = EcoreUtil2.getAllContentsOfType(subclause, NamedElement.class);
        for (NamedElement e : es) {
            if (!(e.eContainer() instanceof NodeDef || e.eContainer() instanceof LinearizationDef || e.eContainer() instanceof RecordDef || e instanceof NamedSpecStatement)) {
                result.add(e.getName());
            }
        }
    }
    return result;
}
Also used : AgreeSubclause(com.rockwellcollins.atc.agree.agree.AgreeSubclause) ComponentType(org.osate.aadl2.ComponentType) NodeDef(com.rockwellcollins.atc.agree.agree.NodeDef) NamedSpecStatement(com.rockwellcollins.atc.agree.agree.NamedSpecStatement) LinearizationDef(com.rockwellcollins.atc.agree.agree.LinearizationDef) NamedElement(org.osate.aadl2.NamedElement) RecordDef(com.rockwellcollins.atc.agree.agree.RecordDef) HashSet(java.util.HashSet)

Aggregations

LinearizationDef (com.rockwellcollins.atc.agree.agree.LinearizationDef)6 NodeDef (com.rockwellcollins.atc.agree.agree.NodeDef)4 ArrayLiteralExpr (com.rockwellcollins.atc.agree.agree.ArrayLiteralExpr)3 ArraySubExpr (com.rockwellcollins.atc.agree.agree.ArraySubExpr)3 ArrayUpdateExpr (com.rockwellcollins.atc.agree.agree.ArrayUpdateExpr)3 BinaryExpr (com.rockwellcollins.atc.agree.agree.BinaryExpr)3 BoolLitExpr (com.rockwellcollins.atc.agree.agree.BoolLitExpr)3 CallExpr (com.rockwellcollins.atc.agree.agree.CallExpr)3 EnumLitExpr (com.rockwellcollins.atc.agree.agree.EnumLitExpr)3 EventExpr (com.rockwellcollins.atc.agree.agree.EventExpr)3 ExistsExpr (com.rockwellcollins.atc.agree.agree.ExistsExpr)3 Expr (com.rockwellcollins.atc.agree.agree.Expr)3 FlatmapExpr (com.rockwellcollins.atc.agree.agree.FlatmapExpr)3 FnDef (com.rockwellcollins.atc.agree.agree.FnDef)3 FoldLeftExpr (com.rockwellcollins.atc.agree.agree.FoldLeftExpr)3 FoldRightExpr (com.rockwellcollins.atc.agree.agree.FoldRightExpr)3 ForallExpr (com.rockwellcollins.atc.agree.agree.ForallExpr)3 GetPropertyExpr (com.rockwellcollins.atc.agree.agree.GetPropertyExpr)3 IfThenElseExpr (com.rockwellcollins.atc.agree.agree.IfThenElseExpr)3 IndicesExpr (com.rockwellcollins.atc.agree.agree.IndicesExpr)3