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];
    }
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];
    }
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 ] ; }
Return object java class name.

@throws Exception\UnexpectedException
@throws BrokenConnectionException

@param Interfaces\JavaObject $javaObject

@return string
Return object java class name .