本文整理了Java中com.eclipsesource.v8.V8.checkScript()
方法的一些代码示例,展示了V8.checkScript()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。V8.checkScript()
方法的具体详情如下:
包路径:com.eclipsesource.v8.V8
类名称:V8
方法名:checkScript
暂无
代码示例来源:origin: eclipsesource/J2V8
/**
* 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);
}
代码示例来源:origin: eclipsesource/J2V8
/**
* 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);
}
代码示例来源:origin: eclipsesource/J2V8
/**
* 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);
}
代码示例来源:origin: eclipsesource/J2V8
/**
* 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);
}
代码示例来源:origin: eclipsesource/J2V8
/**
* 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);
}
代码示例来源:origin: eclipsesource/J2V8
/**
* 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);
}
代码示例来源:origin: eclipsesource/J2V8
/**
* 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);
}
代码示例来源:origin: eclipsesource/J2V8
/**
* 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);
}
代码示例来源:origin: eclipsesource/J2V8
/**
* 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);
}
代码示例来源:origin: eclipsesource/J2V8
/**
* 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);
}
代码示例来源:origin: eclipsesource/J2V8
/**
* 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);
}
代码示例来源:origin: eclipsesource/J2V8
/**
* 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);
}
代码示例来源:origin: com.eclipsesource.j2v8/j2v8_win32_x86_64
/**
* 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);
}
代码示例来源:origin: com.eclipsesource.j2v8/j2v8_macosx_x86_64
/**
* 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);
}
代码示例来源:origin: com.eclipsesource.j2v8/j2v8_win32_x86_64
/**
* 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);
}
代码示例来源:origin: com.eclipsesource.j2v8/j2v8_win32_x86_64
/**
* 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);
}
代码示例来源:origin: com.eclipsesource.j2v8/j2v8_macosx_x86_64
/**
* 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);
}
代码示例来源:origin: com.eclipsesource.j2v8/j2v8_macosx_x86_64
/**
* 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);
}
代码示例来源:origin: com.eclipsesource.j2v8/j2v8_win32_x86_64
/**
* 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);
}
代码示例来源:origin: com.eclipsesource.j2v8/j2v8_macosx_x86_64
/**
* 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);
}
内容来源于网络,如有侵权,请联系作者删除!