use of org.osate.aadl2.instance.util.InstanceSwitch in project osate2 by osate.
the class AadlProcessingSwitch method process.
/**
* Calls the package-specific switch
*/
@Override
public final void process(final Element theElement) {
final EClass theEClass;
/**
* This checks to make sure we only invoke doSwitch with non-null
* objects This is necessary as some feature retrieval methods may
* return null
*/
if (theElement == null) {
return;
}
theEClass = theElement.eClass();
if (aadl2Switch != null && (theEClass.eContainer() == Aadl2Package.eINSTANCE || theElement instanceof AnnexLibrary || theElement instanceof AnnexSubclause)) {
aadl2Switch.doSwitch(theElement);
} else if (instanceSwitch != null && theEClass.eContainer() == InstancePackage.eINSTANCE) {
instanceSwitch.doSwitch(theElement);
}
}
Aggregations