以下は擬似コードです
public void testImportInContext() {
ParserContext ctx = new ParserContext();
ctx.addImport("List", List.class);
ctx.addImport("ArrayList", ArrayList.class);
MVEL.eval("List test = null;User u =null", ctx);
}
例外が発生しました
- [Error: could not access: List; in class: org.mvel2.ParserContext]
- [Near : {... List test = null;User u =null ....}]