org.mozilla.javascript.Context.setGeneratingSource()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 JavaScript  
字(1.1k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.mozilla.javascript.Context.setGeneratingSource()方法的一些代码示例,展示了Context.setGeneratingSource()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.setGeneratingSource()方法的具体详情如下:
包路径:org.mozilla.javascript.Context
类名称:Context
方法名:setGeneratingSource

Context.setGeneratingSource介绍

[英]Specify whether or not source information should be generated.

Without source information, evaluating the "toString" method on JavaScript functions produces only "[native code]" for the body of the function. Note that code generated without source is not fully ECMA conformant.
[中]指定是否应生成源信息。
在没有源信息的情况下,对JavaScript函数评估“toString”方法只会为函数体生成“[本机代码]”。请注意,没有源代码生成的代码并不完全符合ECMA。

代码示例

代码示例来源:origin: org.wso2.bpel.extensions/ode-bpel-extensions-e4x

ctx.setOptimizationLevel(-1);
ctx.setGeneratingDebug(false);
ctx.setGeneratingSource(false);
ctx.setDebugger(null, null);

代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core

cx.setGeneratingSource(false);
cx.setOptimizationLevel(0);
cx.setDebugger(null, null);

代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core

cx.setGeneratingSource(false);
cx.setOptimizationLevel(0);
cx.setDebugger(null, null);

相关文章

微信公众号

Context类方法