class AviatorScriptEngineFactory implements ScriptEngineFactory {

  private static final List<String> extensions =
      Collections.unmodifiableList(Arrays.asList("av", "aviator"));
  private static final List<String> mimeTypes =
      Collections.unmodifiableList(Arrays.asList("text/aviator", "text/aviatorscript"));
  private static final List<String> names = Collections
      .unmodifiableList(Arrays.asList("Aviator", "aviator", "aviatorscript", "AviatorScript"));

  private static final Map<String, String> PARAM_MAP = new HashMap<String, String>();
  static {
    PARAM_MAP.put(ScriptEngine.ENGINE, "Aviator");
    PARAM_MAP.put(ScriptEngine.ENGINE_VERSION, AviatorEvaluator.VERSION);
    PARAM_MAP.put(ScriptEngine.LANGUAGE, "AviatorScript");
    PARAM_MAP.put(ScriptEngine.LANGUAGE_VERSION, AviatorEvaluator.VERSION);
  }


  public static final AviatorScriptEngineFactory newInstance() {
    return new AviatorScriptEngineFactory();
  }


  @Override
  public String getEngineName() {
    return PARAM_MAP.get(ScriptEngine.ENGINE);
  }


  @Override
  public String getEngineVersion() {
    return PARAM_MAP.get(ScriptEngine.ENGINE_VERSION);
  }


  @Override
  public List<String> getExtensions() {
    return extensions;
  }


  @Override
  public String getLanguageName() {
    return PARAM_MAP.get(ScriptEngine.LANGUAGE);
  }


  @Override
  public String getLanguageVersion() {
    return PARAM_MAP.get(ScriptEngine.LANGUAGE_VERSION);
  }


  @Override
  public String getMethodCallSyntax(final String obj, final String m, final String... args) {<FILL_FUNCTION_BODY>}


  @Override
  public List<String> getMimeTypes() {
    return mimeTypes;
  }


  @Override
  public List<String> getNames() {
    return names;
  }


  @Override
  public String getOutputStatement(final String toDisplay) {
    return "print(+" + toDisplay + ")";
  }


  @Override
  public Object getParameter(final String key) {
    return PARAM_MAP.get(key);
  }


  @Override
  public String getProgram(final String... statements) {
    StringBuilder sb = new StringBuilder();
    for (String stmt : statements) {
      sb.append(stmt).append(";");
    }
    return sb.toString();
  }


  @Override
  public ScriptEngine getScriptEngine() {
    return new AviatorScriptEngine(this);
  }

}

    StringBuilder sb = new StringBuilder(m);
    sb.append("(").append(obj);
    if (args != null) {
      for (String s : args) {
        sb.append(",").append(s);
      }
    }
    sb.append(")");
    return sb.toString();

  
<no_super_class>