public interface ScriptLanguage extends ScriptEngineFactory, RichPlugin, SingletonPlugin
Every SciJava scripting language implements this interface, which is based on
JSR
223, Scripting for the Java Platform, included in Java 6 and later in the
javax.script
package. This ScriptLanguage
interface extends
ScriptEngineFactory
, meaning it can act as a JSR 223 Java scripting
language, while also providing additional functionality necessary for full
support within applications such as ImageJ. In particular, this interface
adds API for code generation of scripts to replicate SciJava Module
executions (i.e., for "script recording" of SciJava commands).
Script languages discoverable at runtime must implement this interface and be
annotated with @Plugin
with attribute Plugin.type()
=
ScriptLanguage
.class. While it possible to create a scripting
language adapter merely by implementing this interface, it is encouraged to
instead extend AbstractScriptLanguage
, for convenience.
Modifier and Type | Method and Description |
---|---|
Object |
decode(Object object)
Performs any necessary conversion of an encoded object retrieved from the
language's script engine.
|
boolean |
isCompiledLanguage()
True iff this language requires a compilation step.
|
getEngineName, getEngineVersion, getExtensions, getLanguageName, getLanguageVersion, getMethodCallSyntax, getMimeTypes, getNames, getOutputStatement, getParameter, getProgram, getScriptEngine
context, getContext, setContext
getPriority, setPriority
compareTo
getInfo, setInfo
boolean isCompiledLanguage()
Object decode(Object object)
ScriptEngine.get(String)
Copyright © 2009–2015 SciJava. All rights reserved.