/** * Executes a JS Script on this runtime. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. */ public void executeVoidScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); executeVoidScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as an integer. * If the result is not an integer, then a V8ResultUndefinedException is thrown. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for excepton purposes. * * @return The result of the script as an integer, or V8ResultUndefinedException if * the result is not an integer. */ public int executeIntegerScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeIntegerScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as a double. * If the result is not a double, then a V8ResultUndefinedException is thrown. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. * * @return The result of the script as a double, or V8ResultUndefinedException if * the result is not a double. */ public double executeDoubleScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeDoubleScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as a boolean. * If the result is not a boolean, then a V8ResultUndefinedException is thrown. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. * * @return The result of the script as a boolean, or V8ResultUndefinedException if * the result is not a boolean. */ public boolean executeBooleanScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeBooleanScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as a String. * If the result is not a String, then a V8ResultUndefinedException is thrown. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. * * @return The result of the script as a String, or V8ResultUndefinedException if * the result is not a String. */ public String executeStringScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeStringScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as a Java Object. * Primitives will be boxed. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. * * @return The result of the script as a Java Object. */ public Object executeScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeScript(getV8RuntimePtr(), UNKNOWN, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. */ public void executeVoidScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); executeVoidScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as a String. * If the result is not a String, then a V8ResultUndefinedException is thrown. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. * * @return The result of the script as a String, or V8ResultUndefinedException if * the result is not a String. */ public String executeStringScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeStringScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as a boolean. * If the result is not a boolean, then a V8ResultUndefinedException is thrown. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. * * @return The result of the script as a boolean, or V8ResultUndefinedException if * the result is not a boolean. */ public boolean executeBooleanScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeBooleanScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as an integer. * If the result is not an integer, then a V8ResultUndefinedException is thrown. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for excepton purposes. * * @return The result of the script as an integer, or V8ResultUndefinedException if * the result is not an integer. */ public int executeIntegerScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeIntegerScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as a double. * If the result is not a double, then a V8ResultUndefinedException is thrown. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. * * @return The result of the script as a double, or V8ResultUndefinedException if * the result is not a double. */ public double executeDoubleScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeDoubleScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as a Java Object. * Primitives will be boxed. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. * * @return The result of the script as a Java Object. */ public Object executeScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeScript(getV8RuntimePtr(), UNKNOWN, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. */ public void executeVoidScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); executeVoidScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. */ public void executeVoidScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); executeVoidScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as an integer. * If the result is not an integer, then a V8ResultUndefinedException is thrown. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for excepton purposes. * * @return The result of the script as an integer, or V8ResultUndefinedException if * the result is not an integer. */ public int executeIntegerScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeIntegerScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as a String. * If the result is not a String, then a V8ResultUndefinedException is thrown. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. * * @return The result of the script as a String, or V8ResultUndefinedException if * the result is not a String. */ public String executeStringScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeStringScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as a String. * If the result is not a String, then a V8ResultUndefinedException is thrown. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. * * @return The result of the script as a String, or V8ResultUndefinedException if * the result is not a String. */ public String executeStringScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeStringScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as a boolean. * If the result is not a boolean, then a V8ResultUndefinedException is thrown. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. * * @return The result of the script as a boolean, or V8ResultUndefinedException if * the result is not a boolean. */ public boolean executeBooleanScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeBooleanScript(v8RuntimePtr, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as a Java Object. * Primitives will be boxed. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. * * @return The result of the script as a Java Object. */ public Object executeScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeScript(getV8RuntimePtr(), UNKNOWN, script, scriptName, lineNumber); }
/** * Executes a JS Script on this runtime and returns the result as a Java Object. * Primitives will be boxed. * * @param script The script to execute. * @param scriptName The name of the script * @param lineNumber The line number that is considered to be the first line of * the script. Typically 0, but could be set to another value for exception stack trace purposes. * * @return The result of the script as a Java Object. */ public Object executeScript(final String script, final String scriptName, final int lineNumber) { checkThread(); checkScript(script); return executeScript(getV8RuntimePtr(), UNKNOWN, script, scriptName, lineNumber); }