public function getReflector()
    {
        if ($this->isFunction() || $this->isClosure()) {
            return new \ReflectionFunction($this->getCallable());
        }
        if ($this->isMethod()) {
            return new \ReflectionMethod($this->getClassName(), $this->getMethodName());
        }
        if ($this->isInvokedObject()) {
            return new \ReflectionMethod($this->getClassName(), '__invoke');
        }
        throw new \LogicException('Unknown callable reflection');
    }