Example usage for javax.script ScriptEngine toString

List of usage examples for javax.script ScriptEngine toString

Introduction

In this page you can find the example usage for javax.script ScriptEngine toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of the object.

Usage

From source file:org.jdto.mergers.ScriptMerger.java

private Object executeScript(ScriptEngine engine, String script) {

    try {/*w  w  w . j a v a  2 s .c om*/
        return engine.eval(script);
    } catch (ScriptException ex) {
        String engineName = engine.toString();
        logger.error("Could not execute script in engine: " + engineName, ex);
        throw new RuntimeException("Failure while executing script", ex);
    }
}