public function getOwnConstants()
{
if ($this->ownConstants === null) {
$this->ownConstants = [];
$className = $this->reflection->getName();
foreach ($this->getConstants() as $constantName => $constant) {
if ($className === $constant->getDeclaringClassName()) {
$this->ownConstants[$constantName] = $constant;
}
}
}
return $this->ownConstants;
}