Java by API/javax.script/ScriptEngineFactory — различия между версиями

Материал из Java эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Текущая версия на 14:35, 31 мая 2010

ScriptEngineFactory: getEngineFactories()

  
import java.util.List;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
public class Main {
  public static void main(String[] args) {
    // create ScriptEngineManager
    ScriptEngineManager manager = new ScriptEngineManager();
    List<ScriptEngineFactory> factoryList = manager.getEngineFactories();
    for (ScriptEngineFactory factory : factoryList) {
      System.out.println(factory.getEngineName());
      System.out.println(factory.getLanguageName());
    }
  }
}





ScriptEngineFactory: getEngineName()

  
import java.util.List;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
public class Main {
  public static void main(String args[]) {
    ScriptEngineManager manager = new ScriptEngineManager();
    List<ScriptEngineFactory> factories = manager.getEngineFactories();
    for (ScriptEngineFactory factory : factories) {
      System.out.println(factory.getEngineName());
      System.out.println(factory.getEngineVersion());
      System.out.println(factory.getLanguageName());
      System.out.println(factory.getLanguageVersion());
      System.out.println(factory.getExtensions());
      System.out.println(factory.getMimeTypes());
      System.out.println(factory.getNames());
    }
  }
}





ScriptEngineFactory: getEngineVersion()

  
import java.util.List;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
public class Main {
  public static void main(String args[]) {
    ScriptEngineManager manager = new ScriptEngineManager();
    List<ScriptEngineFactory> factories = manager.getEngineFactories();
    for (ScriptEngineFactory factory : factories) {
      System.out.println(factory.getEngineName());
      System.out.println(factory.getEngineVersion());
      System.out.println(factory.getLanguageName());
      System.out.println(factory.getLanguageVersion());
      System.out.println(factory.getExtensions());
      System.out.println(factory.getMimeTypes());
      System.out.println(factory.getNames());
    }
  }
}





ScriptEngineFactory: getExtensions()

  
import java.util.List;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
public class Main {
  public static void main(String args[]) {
    ScriptEngineManager manager = new ScriptEngineManager();
    List<ScriptEngineFactory> factories = manager.getEngineFactories();
    for (ScriptEngineFactory factory : factories) {
      System.out.println(factory.getEngineName());
      System.out.println(factory.getEngineVersion());
      System.out.println(factory.getLanguageName());
      System.out.println(factory.getLanguageVersion());
      System.out.println(factory.getExtensions());
      System.out.println(factory.getMimeTypes());
      System.out.println(factory.getNames());
    }
  }
}





ScriptEngineFactory: getLanguageName()

  
import java.util.List;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
public class Main {
  public static void main(String args[]) {
    ScriptEngineManager manager = new ScriptEngineManager();
    List<ScriptEngineFactory> factories = manager.getEngineFactories();
    for (ScriptEngineFactory factory : factories) {
      System.out.println(factory.getEngineName());
      System.out.println(factory.getEngineVersion());
      System.out.println(factory.getLanguageName());
      System.out.println(factory.getLanguageVersion());
      System.out.println(factory.getExtensions());
      System.out.println(factory.getMimeTypes());
      System.out.println(factory.getNames());
    }
  }
}





ScriptEngineFactory: getLanguageVersion()

  
import java.util.List;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
public class Main {
  public static void main(String args[]) {
    ScriptEngineManager manager = new ScriptEngineManager();
    List<ScriptEngineFactory> factories = manager.getEngineFactories();
    for (ScriptEngineFactory factory : factories) {
      System.out.println(factory.getEngineName());
      System.out.println(factory.getEngineVersion());
      System.out.println(factory.getLanguageName());
      System.out.println(factory.getLanguageVersion());
      System.out.println(factory.getExtensions());
      System.out.println(factory.getMimeTypes());
      System.out.println(factory.getNames());
    }
  }
}





ScriptEngineFactory: getMimeTypes()

  
import java.util.List;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
public class Main {
  public static void main(String args[]) {
    ScriptEngineManager manager = new ScriptEngineManager();
    List<ScriptEngineFactory> factories = manager.getEngineFactories();
    for (ScriptEngineFactory factory : factories) {
      System.out.println(factory.getEngineName());
      System.out.println(factory.getEngineVersion());
      System.out.println(factory.getLanguageName());
      System.out.println(factory.getLanguageVersion());
      System.out.println(factory.getExtensions());
      System.out.println(factory.getMimeTypes());
      System.out.println(factory.getNames());
    }
  }
}





ScriptEngineFactory: getNames()

  
import java.util.List;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
public class Main {
  public static void main(String args[]) {
    ScriptEngineManager manager = new ScriptEngineManager();
    List<ScriptEngineFactory> factories = manager.getEngineFactories();
    for (ScriptEngineFactory factory : factories) {
      System.out.println(factory.getEngineName());
      System.out.println(factory.getEngineVersion());
      System.out.println(factory.getLanguageName());
      System.out.println(factory.getLanguageVersion());
      System.out.println(factory.getExtensions());
      System.out.println(factory.getMimeTypes());
      System.out.println(factory.getNames());
    }
  }
}