function getRef(Project $p)
{
if (!$this->checked) {
$stk = array();
array_push($stk, $this);
$this->dieOnCircularReference($stk, $p);
}
$o = $this->ref->getReferencedObject($p);
if (!$o instanceof FileSet) {
$msg = $this->ref->getRefId() . " doesn't denote a fileset";
throw new BuildException($msg);
} else {
return $o;
}
}