Example usage for javax.script ScriptEngine getFactory

List of usage examples for javax.script ScriptEngine getFactory

Introduction

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

Prototype

public ScriptEngineFactory getFactory();

Source Link

Document

Returns a ScriptEngineFactory for the class to which this ScriptEngine belongs.

Usage

From source file:tk.tomby.tedit.services.ScriptingManager.java

public static String getLanguage(String name) {
    ScriptEngine engine = manager.getEngineByExtension(getExtension(name));

    if (engine != null) {
        return engine.getFactory().getLanguageName();
    }/*from   w  w w  . jav  a 2 s .  c om*/

    return null;
}