1 This directory contains samples for Dynalink API (http://openjdk.java.net/jeps/276).
   2 These samples require a jar file to be built and such jars be placed in the
   3 classpath 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
   5 another jjs process with appropriate classpath set.
   6 
   7 Dynalink samples:
   8 
   9 * array_stream_linker.js
  10 
  11 This sample builds ArrayStreamLinkerExporter.java and uses it in a sample script
  12 called "array_stream.js". This linker adds "stream" property to Java array
  13 objects. The "stream" property returns appropriate Stream type for the given
  14 Java array (IntStream, DoubleStream ...).
  15 
  16 * buffer_indexing_linker.js
  17 
  18 This sample builds BufferIndexingLinkerExporter.java and uses it in a sample script
  19 called "buffer_index.js". This linker adds array-like indexed access, indexed assignment
  20 and "length" property to Java NIO Buffer objects. Script can treat NIO Buffer objects
  21 as if those are just array objects.
  22 
  23 * dom_linker.js
  24 
  25 This sample builds DOMLinkerExporter.java and uses it in a sample script
  26 called "dom_linker_gutenberg.js". This linker handles DOM Element objects to add
  27 properties to access child elements of a given element by child element tag name.
  28 This simplifies script access of parsed XML DOM Documents.
  29 
  30 * missing_method_linker.js
  31 
  32 This sample builds MissingMethodLinkerExporter.java and uses it in a sample script
  33 called "missing_method.js". This linker supports Smalltalk-style "doesNotUnderstand"
  34 calls on Java objects. i.e., A Java class can implement MissingMethodHandler interface
  35 with one method named "doesNotUnderstand". When script accesses a method on such
  36 object and if that method does not exist in the Java class (or any of it's supertypes),
  37 then "doesNotUnderstand" method is invoked.
  38 
  39 * underscore_linker.js
  40 
  41 This sample builds UnderscoreNameLinkerExporter.java and uses it in a sample script
  42 called "underscore.js". This linker converts underscore separated names to Camel Case
  43 names (as used in Java APIs). You can call Java APIs using Ruby-like naming convention
  44 and this linker converts method names to CamelCase!
  45