Example usage for org.springframework.scripting.support StandardScriptEvaluator setLanguage

List of usage examples for org.springframework.scripting.support StandardScriptEvaluator setLanguage

Introduction

In this page you can find the example usage for org.springframework.scripting.support StandardScriptEvaluator setLanguage.

Prototype

public void setLanguage(String language) 

Source Link

Document

Set the name of the language meant for evaluating the scripts (e.g.

Usage

From source file:org.arrow.service.DefaultExecutionScriptService.java

/**
 * {@inheritDoc}//  w  w w  .  j a v a 2  s. co m
 */
@Override
public Object evaluate(ScriptSource source, ScriptEvaluationContext context) {
    StandardScriptEvaluator scriptEvaluator = new StandardScriptEvaluator();
    scriptEvaluator.setLanguage(context.getScriptLanguage());
    return scriptEvaluator.evaluate(source, context.getArguments());
}