use of org.osate.aadl2.impl.SystemTypeImpl in project VERDICT by ge-high-assurance.
the class ChangeInFile method getStatements.
// extracts the existing annex-statements in the component "sys" on .aadl script
private List<Statement> getStatements(SystemTypeImpl sys) {
List<EObject> objs = sys.eContents();
List<Statement> stmts = new ArrayList<Statement>();
for (int i = 0; i < objs.size(); i++) {
if (objs.get(i) instanceof DefaultAnnexSubclauseImpl) {
if (!((DefaultAnnexSubclauseImpl) objs.get(i)).getName().equals("verdict")) {
continue;
}
Verdict vd = ((VerdictContractSubclause) ((DefaultAnnexSubclauseImpl) objs.get(i)).getParsedAnnexSubclause()).getContract();
stmts = vd.getElements();
break;
}
}
return stmts;
}
Aggregations