Java Script Engine getAvailableEngineGroups()

Here you can find the source of getAvailableEngineGroups()

Description

get Available Engine Groups

License

Apache License

Declaration

public static List<List<String>> getAvailableEngineGroups() 

Method Source Code

//package com.java2s;
/*//from   w  w  w. ja va 2 s .  com
     
 Copyright 2015 HJOW
    
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
    
http://www.apache.org/licenses/LICENSE-2.0
    
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
     
 */

import java.util.List;

import java.util.Vector;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;

public class Main {

    public static List<List<String>> getAvailableEngineGroups() {
        List<List<String>> availableNames = new Vector<List<String>>();

        ScriptEngineManager manager = new ScriptEngineManager();
        List<ScriptEngineFactory> factories = manager.getEngineFactories();
        for (ScriptEngineFactory factory : factories) {
            availableNames.add(factory.getNames());
        }

        return availableNames;
    }
}

Related

  1. compile(ScriptEngine engine, String script)
  2. createNashornEngine()
  3. evaluateScriptResource(ScriptEngine engine, String resource)
  4. getAppleScriptEngine()
  5. getDefaultScriptEngineManager()
  6. getEngine()
  7. getEngine(String engineName)
  8. getScriptEngine()