public function getTopInheritance()
{
$inheritance = $this->getInheritance();
if (!empty($inheritance)) {
$struct = $this->getInheritanceStruct();
while ($struct instanceof Struct) {
$structInheritance = $struct->getInheritance();
if (!empty($structInheritance)) {
$inheritance = $structInheritance;
}
$struct = $struct->getInheritanceStruct();
}
}
return $inheritance;
}