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

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

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

Context.compileImpl介绍

暂无

代码示例

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

/**
 * Compiles the source in the given reader.
 * <p>
 * Returns a script that may later be executed.
 * Will consume all the source in the reader.
 *
 * @param in the input reader
 * @param sourceName a string describing the source, such as a filename
 * @param lineno the starting line number for reporting errors
 * @param securityDomain an arbitrary object that specifies security
 *        information about the origin or owner of the script. For
 *        implementations that don't care about security, this value
 *        may be null.
 * @return a script that may later be executed
 * @exception IOException if an IOException was generated by the Reader
 * @see org.mozilla.javascript.Script
 */
public final Script compileReader(Reader in, String sourceName,
                 int lineno, Object securityDomain)
  throws IOException
{
  if (lineno < 0) {
    // For compatibility IllegalArgumentException can not be thrown here
    lineno = 0;
  }
  return (Script) compileImpl(null, in, null, sourceName, lineno,
                securityDomain, false, null, null);
}

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

/**
 * Compiles the source in the given reader.
 * <p>
 * Returns a script that may later be executed.
 * Will consume all the source in the reader.
 *
 * @param in the input reader
 * @param sourceName a string describing the source, such as a filename
 * @param lineno the starting line number for reporting errors
 * @param securityDomain an arbitrary object that specifies security
 *        information about the origin or owner of the script. For
 *        implementations that don't care about security, this value
 *        may be null.
 * @return a script that may later be executed
 * @exception IOException if an IOException was generated by the Reader
 * @see org.mozilla.javascript.Script
 */
public final Script compileReader(Reader in, String sourceName,
                 int lineno, Object securityDomain)
  throws IOException
{
  if (lineno < 0) {
    // For compatibility IllegalArgumentException can not be thrown here
    lineno = 0;
  }
  return (Script) compileImpl(null, in, null, sourceName, lineno,
                securityDomain, false, null, null);
}

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

/**
 * Compiles the source in the given reader.
 * <p>
 * Returns a script that may later be executed.
 * Will consume all the source in the reader.
 *
 * @param in the input reader
 * @param sourceName a string describing the source, such as a filename
 * @param lineno the starting line number for reporting errors
 * @param securityDomain an arbitrary object that specifies security
 *        information about the origin or owner of the script. For
 *        implementations that don't care about security, this value
 *        may be null.
 * @return a script that may later be executed
 * @exception IOException if an IOException was generated by the Reader
 * @see org.mozilla.javascript.Script
 */
public final Script compileReader(Reader in, String sourceName,
                 int lineno, Object securityDomain)
  throws IOException
{
  if (lineno < 0) {
    // For compatibility IllegalArgumentException can not be thrown here
    lineno = 0;
  }
  return (Script) compileImpl(null, in, null, sourceName, lineno,
                securityDomain, false, null, null);
}

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

/**
 * Compiles the source in the given reader.
 * <p>
 * Returns a script that may later be executed.
 * Will consume all the source in the reader.
 *
 * @param in the input reader
 * @param sourceName a string describing the source, such as a filename
 * @param lineno the starting line number for reporting errors
 * @param securityDomain an arbitrary object that specifies security
 *        information about the origin or owner of the script. For
 *        implementations that don't care about security, this value
 *        may be null.
 * @return a script that may later be executed
 * @exception IOException if an IOException was generated by the Reader
 * @see org.mozilla.javascript.Script
 */
public final Script compileReader(Reader in, String sourceName,
                 int lineno, Object securityDomain)
  throws IOException
{
  if (lineno < 0) {
    // For compatibility IllegalArgumentException can not be thrown here
    lineno = 0;
  }
  return (Script) compileImpl(null, in, null, sourceName, lineno,
                securityDomain, false, null, null);
}

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

final Script compileString(String source,
              Evaluator compiler,
              ErrorReporter compilationErrorReporter,
              String sourceName, int lineno,
              Object securityDomain)
{
  try {
    return (Script) compileImpl(null, null, source, sourceName, lineno,
                  securityDomain, false,
                  compiler, compilationErrorReporter);
  } catch (IOException ex) {
    // Should not happen when dealing with source as string
    throw new RuntimeException();
  }
}

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

/**
 * Compiles the source in the given reader.
 * <p>
 * Returns a script that may later be executed.
 * Will consume all the source in the reader.
 *
 * @param in the input reader
 * @param sourceName a string describing the source, such as a filename
 * @param lineno the starting line number for reporting errors
 * @param securityDomain an arbitrary object that specifies security
 *        information about the origin or owner of the script. For
 *        implementations that don't care about security, this value
 *        may be null.
 * @return a script that may later be executed
 * @exception IOException if an IOException was generated by the Reader
 * @see org.mozilla.javascript.Script
 */
public final Script compileReader(Reader in, String sourceName,
                 int lineno, Object securityDomain)
  throws IOException
{
  if (lineno < 0) {
    // For compatibility IllegalArgumentException can not be thrown here
    lineno = 0;
  }
  return (Script) compileImpl(null, in, null, sourceName, lineno,
                securityDomain, false, null, null);
}

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

/**
 * Compiles the source in the given reader.
 * <p>
 * Returns a script that may later be executed.
 * Will consume all the source in the reader.
 *
 * @param in the input reader
 * @param sourceName a string describing the source, such as a filename
 * @param lineno the starting line number for reporting errors
 * @param securityDomain an arbitrary object that specifies security
 *        information about the origin or owner of the script. For
 *        implementations that don't care about security, this value
 *        may be null.
 * @return a script that may later be executed
 * @exception IOException if an IOException was generated by the Reader
 * @see org.mozilla.javascript.Script
 */
public final Script compileReader(Reader in, String sourceName,
                 int lineno, Object securityDomain)
  throws IOException
{
  if (lineno < 0) {
    // For compatibility IllegalArgumentException can not be thrown here
    lineno = 0;
  }
  return (Script) compileImpl(null, in, null, sourceName, lineno,
                securityDomain, false, null, null);
}

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

final Script compileString(String source,
              Evaluator compiler,
              ErrorReporter compilationErrorReporter,
              String sourceName, int lineno,
              Object securityDomain)
{
  try {
    return (Script) compileImpl(null, null, source, sourceName, lineno,
                  securityDomain, false,
                  compiler, compilationErrorReporter);
  } catch (IOException ex) {
    // Should not happen when dealing with source as string
    throw new RuntimeException();
  }
}

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

final Script compileString(String source,
              Evaluator compiler,
              ErrorReporter compilationErrorReporter,
              String sourceName, int lineno,
              Object securityDomain)
{
  try {
    return (Script) compileImpl(null, null, source, sourceName, lineno,
                  securityDomain, false,
                  compiler, compilationErrorReporter);
  } catch (IOException ex) {
    // Should not happen when dealing with source as string
    throw new RuntimeException();
  }
}

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

final Script compileString(String source,
              Evaluator compiler,
              ErrorReporter compilationErrorReporter,
              String sourceName, int lineno,
              Object securityDomain)
{
  try {
    return (Script) compileImpl(null, null, source, sourceName, lineno,
                  securityDomain, false,
                  compiler, compilationErrorReporter);
  } catch (IOException ex) {
    // Should not happen when dealing with source as string
    throw new RuntimeException();
  }
}

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

final Script compileString(String source,
              Interpreter compiler,
              ErrorReporter compilationErrorReporter,
              String sourceName, int lineno,
              Object securityDomain)
{
  try {
    return (Script) compileImpl(null, null, source, sourceName, lineno,
                  securityDomain, false,
                  compiler, compilationErrorReporter);
  } catch (IOException ex) {
    // Should not happen when dealing with source as string
    throw new RuntimeException();
  }
}

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

final Script compileString(String source,
              Evaluator compiler,
              ErrorReporter compilationErrorReporter,
              String sourceName, int lineno,
              Object securityDomain)
{
  try {
    return (Script) compileImpl(null, null, source, sourceName, lineno,
                  securityDomain, false,
                  compiler, compilationErrorReporter);
  } catch (IOException ex) {
    // Should not happen when dealing with source as string
    throw new RuntimeException();
  }
}

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

final Function compileFunction(Scriptable scope, String source,
                Evaluator compiler,
                ErrorReporter compilationErrorReporter,
                String sourceName, int lineno,
                Object securityDomain)
{
  try {
    return (Function) compileImpl(scope, null, source, sourceName,
                   lineno, securityDomain, true,
                   compiler, compilationErrorReporter);
  }
  catch (IOException ioe) {
    // Should never happen because we just made the reader
    // from a String
    throw new RuntimeException();
  }
}

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

final Function compileFunction(Scriptable scope, String source,
                Evaluator compiler,
                ErrorReporter compilationErrorReporter,
                String sourceName, int lineno,
                Object securityDomain)
{
  try {
    return (Function) compileImpl(scope, null, source, sourceName,
                   lineno, securityDomain, true,
                   compiler, compilationErrorReporter);
  }
  catch (IOException ioe) {
    // Should never happen because we just made the reader
    // from a String
    throw new RuntimeException();
  }
}

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

final Function compileFunction(Scriptable scope, String source,
                Interpreter compiler,
                ErrorReporter compilationErrorReporter,
                String sourceName, int lineno,
                Object securityDomain)
{
  try {
    return (Function) compileImpl(scope, null, source, sourceName,
                   lineno, securityDomain, true,
                   compiler, compilationErrorReporter);
  }
  catch (IOException ioe) {
    // Should never happen because we just made the reader
    // from a String
    throw new RuntimeException();
  }
}

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

final Function compileFunction(Scriptable scope, String source,
                Evaluator compiler,
                ErrorReporter compilationErrorReporter,
                String sourceName, int lineno,
                Object securityDomain)
{
  try {
    return (Function) compileImpl(scope, null, source, sourceName,
                   lineno, securityDomain, true,
                   compiler, compilationErrorReporter);
  }
  catch (IOException ioe) {
    // Should never happen because we just made the reader
    // from a String
    throw new RuntimeException();
  }
}

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

final Function compileFunction(Scriptable scope, String source,
                Evaluator compiler,
                ErrorReporter compilationErrorReporter,
                String sourceName, int lineno,
                Object securityDomain)
{
  try {
    return (Function) compileImpl(scope, null, source, sourceName,
                   lineno, securityDomain, true,
                   compiler, compilationErrorReporter);
  }
  catch (IOException ioe) {
    // Should never happen because we just made the reader
    // from a String
    throw new RuntimeException();
  }
}

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

final Function compileFunction(Scriptable scope, String source,
                Evaluator compiler,
                ErrorReporter compilationErrorReporter,
                String sourceName, int lineno,
                Object securityDomain)
{
  try {
    return (Function) compileImpl(scope, null, source, sourceName,
                   lineno, securityDomain, true,
                   compiler, compilationErrorReporter);
  }
  catch (IOException ioe) {
    // Should never happen because we just made the reader
    // from a String
    throw new RuntimeException();
  }
}

相关文章

微信公众号

Context类方法