use of com.googlecode.aviator.script.AviatorScriptEngine in project aviatorscript by killme2008.
the class ConfigureEngine method main.
public static void main(final String[] args) throws Exception {
final ScriptEngineManager sem = new ScriptEngineManager();
ScriptEngine engine = sem.getEngineByName("AviatorScript");
AviatorEvaluatorInstance instance = ((AviatorScriptEngine) engine).getEngine();
// Use compatible feature set
instance.setOption(Options.FEATURE_SET, Feature.getCompatibleFeatures());
// Doesn't support if in compatible feature set mode.
engine.eval("if(true) { println('support if'); }");
}
Aggregations