org.scijava.script
Interface ScriptLanguage
- All Superinterfaces:
- Comparable<Prioritized>, Contextual, HasPluginInfo, Prioritized, RichPlugin, SciJavaPlugin, ScriptEngineFactory, SingletonPlugin
- All Known Implementing Classes:
- AbstractScriptLanguage, AdaptedScriptLanguage
public interface ScriptLanguage
- extends ScriptEngineFactory, RichPlugin, SingletonPlugin
The base interface for scripting language adapters.
Every ImageJ 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 ImageJ. In particular, this interface adds API for code
generation of scripts to replicate ImageJ Module
executions (i.e.,
for "script recording" of ImageJ 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.
- Author:
- Johannes Schindelin
Method Summary |
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. |
Methods inherited from interface javax.script.ScriptEngineFactory |
getEngineName, getEngineVersion, getExtensions, getLanguageName, getLanguageVersion, getMethodCallSyntax, getMimeTypes, getNames, getOutputStatement, getParameter, getProgram, getScriptEngine |
isCompiledLanguage
boolean isCompiledLanguage()
- True iff this language requires a compilation step.
decode
Object decode(Object object)
- Performs any necessary conversion of an encoded object retrieved from the
language's script engine.
- See Also:
ScriptEngine.get(String)
Copyright © 2009–2014 SciJava. All rights reserved.