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

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

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

Context.<init>介绍

[英]Creates a new Context. The context will be associated with the ContextFactory#getGlobal(). Note that the Context must be associated with a thread before it can be used to execute a script.
[中]创建一个新的上下文。上下文将与ContextFactory#getGlobal()关联。请注意,上下文必须先与线程关联,然后才能用于执行脚本。

代码示例

代码示例来源:origin: io.apigee/rhino

/**
 * Create new {@link Context} instance to be associated with the current
 * thread.
 * This is a callback method used by Rhino to create {@link Context}
 * instance when it is necessary to associate one with the current
 * execution thread. <tt>makeContext()</tt> is allowed to call
 * {@link Context#seal(Object)} on the result to prevent
 * {@link Context} changes by hostile scripts or applets.
 */
protected Context makeContext()
{
  return new Context(this);
}

代码示例来源:origin: rhino/js

/**
 * Create new {@link Context} instance to be associated with the current
 * thread.
 * This is a callback method used by Rhino to create {@link Context}
 * instance when it is necessary to associate one with the current
 * execution thread. <tt>makeContext()</tt> is allowed to call
 * {@link Context#seal(Object)} on the result to prevent
 * {@link Context} changes by hostile scripts or applets.
 */
protected Context makeContext()
{
  return new Context(this);
}

代码示例来源:origin: ro.isdc.wro4j/rhino

/**
 * Create new {@link Context} instance to be associated with the current
 * thread.
 * This is a callback method used by Rhino to create {@link Context}
 * instance when it is necessary to associate one with the current
 * execution thread. <tt>makeContext()</tt> is allowed to call
 * {@link Context#seal(Object)} on the result to prevent
 * {@link Context} changes by hostile scripts or applets.
 */
protected Context makeContext()
{
  return new Context(this);
}

代码示例来源:origin: geogebra/geogebra

/**
 * Create new {@link Context} instance to be associated with the current
 * thread.
 * This is a callback method used by Rhino to create {@link Context}
 * instance when it is necessary to associate one with the current
 * execution thread. <tt>makeContext()</tt> is allowed to call
 * {@link Context#seal(Object)} on the result to prevent
 * {@link Context} changes by hostile scripts or applets.
 */
protected Context makeContext()
{
  return new Context(this);
}

代码示例来源:origin: com.sun.phobos/phobos-rhino

/**
 * Create new {@link Context} instance to be associated with the current
 * thread.
 * This is a callback method used by Rhino to create {@link Context}
 * instance when it is necessary to associate one with the current
 * execution thread. <tt>makeContext()</tt> is allowed to call
 * {@link Context#seal(Object)} on the result to prevent
 * {@link Context} changes by hostile scripts or applets.
 */
protected Context makeContext()
{
  return new Context();
}

代码示例来源:origin: com.github.tntim96/rhino

/**
 * Create new {@link Context} instance to be associated with the current
 * thread.
 * This is a callback method used by Rhino to create {@link Context}
 * instance when it is necessary to associate one with the current
 * execution thread. <tt>makeContext()</tt> is allowed to call
 * {@link Context#seal(Object)} on the result to prevent
 * {@link Context} changes by hostile scripts or applets.
 */
protected Context makeContext()
{
  return new Context(this);
}

相关文章

微信公众号

Context类方法