Например: моя проблема может быть воспроизведена в Java: < /p>
Код: Выделить всё
if(this instanceof A)
doA();
else if(this instanceof B)
doB();
else if(this instanceof C)
doC():
Подробнее здесь: https://stackoverflow.com/questions/557 ... -statement