public function add(string $class, string $filename): self
    {
        if (substr($class, -2) === '\*') { // Is class in a namespace. Example: Namespace\*
            $this->patterns[] = [substr($class, 0, -1), $filename];
        } else {
            $this->classes[$class] = $filename;
        }
        return $this;
    }