Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
META-INF/services/ | H | 17-Apr-2020 | - | 6 | 5 | |
ArrayStreamLinkerExporter.java | H A D | 17-Apr-2020 | 5.3 KiB | 122 | 75 | |
BufferIndexingLinkerExporter.java | H A D | 17-Apr-2020 | 11 KiB | 250 | 196 | |
DOMLinkerExporter.java | H A D | 17-Apr-2020 | 7.2 KiB | 163 | 104 | |
MissingMethodExample.java | H A D | 17-Apr-2020 | 2.3 KiB | 54 | 15 | |
MissingMethodHandler.java | H A D | 17-Apr-2020 | 1.8 KiB | 38 | 3 | |
MissingMethodLinkerExporter.java | H A D | 17-Apr-2020 | 8.4 KiB | 179 | 104 | |
README | H A D | 17-Apr-2020 | 2.1 KiB | 46 | 33 | |
UnderscoreNameLinkerExporter.java | H A D | 17-Apr-2020 | 4.9 KiB | 108 | 60 |
README
1This directory contains samples for Dynalink API (http://openjdk.java.net/jeps/276). 2These samples require a jar file to be built and such jars be placed in the 3classpath of the jjs tool. Linker samples are named with the naming pattern 4"xyz_linker.js". These scripts build dynalink linker jar from java code and exec 5another jjs process with appropriate classpath set. 6 7Dynalink samples: 8 9* array_stream_linker.js 10 11This sample builds ArrayStreamLinkerExporter.java and uses it in a sample script 12called "array_stream.js". This linker adds "stream" property to Java array 13objects. The "stream" property returns appropriate Stream type for the given 14Java array (IntStream, DoubleStream ...). 15 16* buffer_indexing_linker.js 17 18This sample builds BufferIndexingLinkerExporter.java and uses it in a sample script 19called "buffer_index.js". This linker adds array-like indexed access, indexed assignment 20and "length" property to Java NIO Buffer objects. Script can treat NIO Buffer objects 21as if those are just array objects. 22 23* dom_linker.js 24 25This sample builds DOMLinkerExporter.java and uses it in a sample script 26called "dom_linker_gutenberg.js". This linker handles DOM Element objects to add 27properties to access child elements of a given element by child element tag name. 28This simplifies script access of parsed XML DOM Documents. 29 30* missing_method_linker.js 31 32This sample builds MissingMethodLinkerExporter.java and uses it in a sample script 33called "missing_method.js". This linker supports Smalltalk-style "doesNotUnderstand" 34calls on Java objects. i.e., A Java class can implement MissingMethodHandler interface 35with one method named "doesNotUnderstand". When script accesses a method on such 36object and if that method does not exist in the Java class (or any of it's supertypes), 37then "doesNotUnderstand" method is invoked. 38 39* underscore_linker.js 40 41This sample builds UnderscoreNameLinkerExporter.java and uses it in a sample script 42called "underscore.js". This linker converts underscore separated names to Camel Case 43names (as used in Java APIs). You can call Java APIs using Ruby-like naming convention 44and this linker converts method names to CamelCase! 45 46