Dynamic Polymorphism - Xyna-Factory/xyna GitHub Wiki
The dynamic polymorphism describes the call of an Instance Service, whose instance is only evaluated at runtime. So the actually executed implementation depends on the dynamic type of the Data Type, the Instance Service is called for.
<syntaxhighlight lang="java"> class Device { void setIPAddress(IPAddress ip); } class MacBook extends Device { void setIPAddress(IPAddress ip) { doSomething(); } } class IPhone extends Device { void setIPAddress(IPAddress ip) { doSomethingElse(); } } </syntaxhighlight>Depending on the passed Device instance, executing the Service setIPAddress does doSomething() or doSomethingElse().