protected function getMethods(PackageClass $package_class)
    {
        try {
            $class = new \ReflectionClass($package_class->getName());
        } catch (\ReflectionException $e) {
            return [];
        }
        $methods = $class->getMethods();

        foreach ($methods as $key => $method) {
            if ($method->name === '__construct') {
                // The interface should not contain the constructor
                unset($methods[$key]);
                continue;
            }
            $methods[$key] = new ReflectionMethod($method);
        }

        return $methods;
    }