public function getMethods()
{
if (is_array($this->methods)) {
return new ASTArtifactList($this->methods);
}
$methods = (array) $this->cache->type('methods')->restore($this->getId());
foreach ($methods as $method) {
$method->compilationUnit = $this->compilationUnit;
$method->setParent($this);
}
return new ASTArtifactList($methods);
}