Changes between Version 2 and Version 3 of JavaScriptingAPI


Ignore:
Timestamp:
03/16/09 14:59:59 (15 years ago)
Author:
astalla
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • JavaScriptingAPI

    v2 v3  
    11= JSR-223 support in ABCL =
    22
    3 ABCL is integrated with the Java Scripting API (JSR-223, package javax.script) which is built-in into Java 6.
     3ABCL is integrated with the Java Scripting API (JSR-223, package javax.script) which is built-in in Java 6.
    44
    55This page describes the design decisions behind the ABCL JSR-223 support. It is not a description of what JSR-223 is or a tutorial on how to use it. See http://trac.common-lisp.net/armedbear/browser/trunk/abcl/examples/abcl/jsr-223 for example usage.
    66
     7== Implemented interfaces ==
     8
     9JSR-223 defines three main interfaces, of which two (Invocable and Compilable) are optional. ABCL implements all the three interfaces - !ScriptEngine and the two optional ones - almost completely. The JSR-223 API is not specific to a single scripting language, however was designed with languages with a more or less Java-like object model in mind: languages such as Javascript, Python, Ruby, which have a concept of "class" or "object" with "fields" and "methods". Lisp is a bit different, so certain adaptations were made, and in one case a method has been left unimplemented since it does not map at all to Lisp.
     10
     11== !ScriptEngine ==
     12
     13The main interface defined by JSR-223, {{{javax.script.ScriptEngine}}}, is implemented by the class [http://trac.common-lisp.net/armedbear/browser/trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngine.java org.armedbear.lisp.scripting.AbclScriptEngine]. !AbclScriptEngine is intended to be a singleton, even if it has a public constructor - which will probably be made protected in future versions of the engine. You can obtain an instance of !AbclScriptEngine using the [http://trac.common-lisp.net/armedbear/browser/trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngineFactory.java AbclScriptEngineFactory] or by using the service provider mechanism through !ScriptEngineManager (refer to the javax.script documentation).
     14
     15=== Configuration file ===
     16
     17At startup
     18
    719TBD