private static boolean isNumber(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_NUMBER, null); } catch (V8ResultUndefined e) { return false; } }
private static boolean isBoolean(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_BOOLEAN, null); } catch (V8ResultUndefined e) { return false; } }
private static boolean isFunction(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_FUNCTION, null); } catch (V8ResultUndefined e) { return false; } }
private static boolean isString(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_STRING, null); } catch (V8ResultUndefined e) { return false; } }
private static boolean isNull(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_NULL, null); } catch (V8ResultUndefined e) { return false; } }
private static boolean isArray(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_ARRAY, null); } catch (V8ResultUndefined e) { return false; } }
private static boolean isObject(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_OBJECT, null); } catch (V8ResultUndefined e) { return false; } }
private static boolean isUndefined(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_UNDEFINED, null); } catch (V8ResultUndefined e) { return false; } }
/** * Returns true if this mirror object points to the type 'undefined'. * False otherwise. * * @return True iff this mirror object points to an 'undefined' type. */ public boolean isUndefined() { return v8Object.executeBooleanFunction(IS_UNDEFINED, null); }
protected static boolean isValue(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_VALUE, null); } catch (V8ResultUndefined e) { return false; } }
protected static boolean isValue(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_VALUE, null); } catch (V8ResultUndefined e) { return false; } }
private static boolean isArray(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_ARRAY, null); } catch (V8ResultUndefined e) { return false; } }
private static boolean isString(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_STRING, null); } catch (V8ResultUndefined e) { return false; } }
private static boolean isUndefined(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_UNDEFINED, null); } catch (V8ResultUndefined e) { return false; } }
/** * Returns true if this mirror object points to the type 'undefined'. * False otherwise. * * @return True iff this mirror object points to an 'undefined' type. */ public boolean isUndefined() { return v8Object.executeBooleanFunction(IS_UNDEFINED, null); }
private static boolean isObject(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_OBJECT, null); } catch (V8ResultUndefined e) { return false; } }
private static boolean isNumber(final V8Object mirror) { try { return mirror.executeBooleanFunction(IS_NUMBER, null); } catch (V8ResultUndefined e) { return false; } }
while (isConnected() && !stoppedStateDcp.executeBooleanFunction("isRunning", null)) { try { processRequests(10);
@Test(expected = UnsupportedOperationException.class) public void testExecuteBooleanFunctionUndefined() { V8Object undefined = v8.getObject("object"); undefined.executeBooleanFunction("foo", null); }
@Test public void testBooleanFunctionCallOnJSObject() { ICallback callback = mock(ICallback.class); doReturn(false).when(callback).booleanMethodNoParameters(); V8Object v8Object = new V8Object(v8); v8Object.registerJavaMethod(callback, "booleanMethodNoParameters", "foo", new Class<?>[0]); boolean result = v8Object.executeBooleanFunction("foo", null); verify(callback).booleanMethodNoParameters(); assertFalse(result); v8Object.close(); }