| 7 | == Implemented interfaces == |
| 8 | |
| 9 | JSR-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 | |
| 13 | The 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 | |
| 17 | At startup |
| 18 | |