use of org.osate.aadl2.SubprogramImplementation in project osate2 by osate.
the class AadlBaTypeChecker method getSubprogramType.
// Recursive method.
private Classifier getSubprogramType(CalledSubprogram sc) {
Classifier result = null;
if (sc instanceof SubprogramImplementation) {
result = ((SubprogramImplementation) sc).getType();
} else if (sc instanceof SubprogramType) {
result = (SubprogramType) sc;
} else if (sc instanceof SubprogramAccess) {
SubprogramAccess sa = (SubprogramAccess) sc;
result = sa.getClassifier();
} else if (sc instanceof SubprogramSubcomponent) {
SubprogramSubcomponent ss = (SubprogramSubcomponent) sc;
result = ss.getClassifier();
}
return result;
}
Aggregations