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]);
    }