Lines Matching refs:extension
40 * as well as utility methods which look up factories on the basis of language name, file extension
253 * Look up and create a <code>ScriptEngine</code> for a given extension. The algorithm
256 * given extension using <code>registerEngineExtension</code>.
257 * @param extension The given extension
258 * @return The engine to handle scripts with this extension. Returns <code>null</code>
260 * @throws NullPointerException if extension is null.
262 public ScriptEngine getEngineByExtension(String extension) {
263 if (extension == null) throw new NullPointerException();
264 //look for registered extension first
266 if (null != (obj = extensionAssociations.get(extension))) {
286 if (extension.equals(ext)) {
389 * Registers a <code>ScriptEngineFactory</code> to handle an extension.
392 * @param extension The extension type to be associated with the
394 * @param factory The class to associate with the given extension.
397 public void registerEngineExtension(String extension, ScriptEngineFactory factory) {
398 if (extension == null || factory == null) throw new NullPointerException();
399 extensionAssociations.put(extension, factory);
408 /** Map of script file extension to script engine factory. */