public function getClassName(Interfaces\JavaObject $javaObject): string
    {
        $inspect = $this->inspect($javaObject);

        // [class java.sql.DriverManager:
        $matches = [];
        preg_match('/^\[class (.+)\:/', $inspect, $matches);
        if (!isset($matches[1]) || $matches[1] == '') {
            throw new Exception\UnexpectedException(__METHOD__.' Cannot determine class name');
        }

        return $matches[1];
    }