public function evaluate()
    {
        if ($this->refid === null) {
            throw new BuildException(
                "No ref attribute specified for reference-exists "
                . "condition"
            );
        }
        $refs = $this->project->getReferences();

        return !($refs[$this->refid] instanceof UnknownElement) && isset($refs[$this->refid]);
    }