org.mvel2.MVEL.evalFile()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(166)

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

MVEL.evalFile介绍

[英]Evaluate a script from a file and return the resultant value.
[中]对文件中的脚本求值并返回结果值。

代码示例

代码示例来源:origin: org.mvel/mvel2

public void testMultiLineString() throws IOException {
  MVEL.evalFile(new File("samples/scripts/multilinestring.mvel"));
 }
}

代码示例来源:origin: org.mvel/mvel2

public void testFunctionsScript1() throws IOException {
 MVEL.evalFile(new File("samples/scripts/functions1.mvel"));
}

代码示例来源:origin: org.mvel/mvel2

public void testQuickSortScript1() throws IOException {
 MVEL.evalFile(new File("samples/scripts/quicksort.mvel"));
}

代码示例来源:origin: org.mvel/mvel2

public void testQuickSortScriptFunctional() throws IOException {
 MVEL.evalFile(new File("samples/scripts/fquicksort.mvel"));
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

public static void main(String[] args) throws IOException {
 if (args.length != 0) {
  MVEL.evalFile(new File(args[0]));
 }
 else {
  showSplash();
  new ShellSession().run();
 }
}

代码示例来源:origin: org.mvel/mvel2

public static void main(String[] args) throws IOException {
 if (args.length != 0) {
  MVEL.evalFile(new File(args[0]));
 }
 else {
  showSplash();
  new ShellSession().run();
 }
}

代码示例来源:origin: org.mvel/mvel2

public void testScript() throws IOException {
 final Object o = MVEL.evalFile(new File(dir + "/demo.mvel"), new HashMap<String, Object>());
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.mvel

public static void main(String[] args) throws IOException {
  if (args.length != 0) {
    MVEL.evalFile(new File(args[0]));
  }
  else {
    showSplash();
    new ShellSession().run();
  }
}

代码示例来源:origin: org.mvel/mvel2

/**
 * evalFile with encoding(workspace encoding utf-8)
 *
 * @throws IOException
 */
public void testEvalFile1() throws IOException {
 Object obj = MVEL.evalFile(file, "UTF-8");
 assertEquals("?????", obj);
 // use default encoding
 obj = MVEL.evalFile(file);
 assertEquals("?????", obj);
}

相关文章