public function isInstanceOf(Interfaces\JavaObject $object, $class): bool
    {
        if (is_string($class)) {
            // Attempt to initiate a class
            $name = $class;
            // Will eventually throws ClassNotFoundException
            $class = $this->getJavaClass($name);
        } elseif (!$class instanceof Interfaces\JavaObject) {
            throw new Exception\InvalidArgumentException(__METHOD__.'Class $class parameter must be of Interfaces\JavaClass, Interfaces\JavaObject or string');
        }

        return self::getClient()->invokeMethod(0, 'instanceOf', [$object, $class]);
    }
public function isInstanceOf(Interfaces\JavaObject $object, $class): bool
    {
        if (is_string($class)) {
            // Attempt to initiate a class
            $name = $class;
            // Will eventually throws ClassNotFoundException
            $class = $this->getJavaClass($name);
        } elseif (!$class instanceof Interfaces\JavaObject) {
            throw new Exception\InvalidArgumentException(__METHOD__.'Class $class parameter must be of Interfaces\JavaClass, Interfaces\JavaObject or string');
        }

        return self::getClient()->invokeMethod(0, 'instanceOf', [$object, $class]);
    }
public function isInstanceOf ( Interfaces \ JavaObject $ object , $ class ) : bool { if ( is_string ( $ class ) ) { // Attempt to initiate a class $ name = $ class ; // Will eventually throws ClassNotFoundException $ class = $ this -> getJavaClass ( $ name ) ; } elseif ( ! $ class instanceof Interfaces \ JavaObject ) { throw new Exception \ InvalidArgumentException ( __METHOD__ . 'Class $class parameter must be of Interfaces\JavaClass, Interfaces\JavaObject or string' ) ; } return self :: getClient ( ) -> invokeMethod ( 0 , 'instanceOf' , [ $ object , $ class ] ) ; }
Test whether an object is an instance of java class or interface.

@throws Exception\InvalidArgumentException
@throws \Soluble\Japha\Bridge\Driver\Pjb62\Exception\BrokenConnectionException

@param Interfaces\JavaObject                                             $object
@param JavaType|string|Interfaces\JavaClass|Interfaces\JavaObject|string $class

@return bool
Test whether an object is an instance of java class or interface .