public function getSupertypes()
{
if (null === $this->superTypes) {
$this->superTypes = array();
foreach ($this->getDeclaredSupertypes() as $superType) {
$this->superTypes[] = $superType;
$this->superTypes = array_merge($this->superTypes, $superType->getSupertypes());
}
}
return $this->superTypes;
}