author | rwestberg |
Fri, 01 Jun 2018 10:15:48 +0200 | |
changeset 50336 | 1b6ea6bcd21a |
parent 47269 | 6e99a776ae76 |
permissions | -rw-r--r-- |
34549
412a690d4414
8144979: Context.fromClass should catch exception from Class.getClassLoader call
sundar
parents:
34548
diff
changeset
|
1 |
This directory contains samples for Dynalink API (http://openjdk.java.net/jeps/276). |
412a690d4414
8144979: Context.fromClass should catch exception from Class.getClassLoader call
sundar
parents:
34548
diff
changeset
|
2 |
These samples require a jar file to be built and such jars be placed in the |
34548
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
3 |
classpath of the jjs tool. Linker samples are named with the naming pattern |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
4 |
"xyz_linker.js". These scripts build dynalink linker jar from java code and exec |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
5 |
another jjs process with appropriate classpath set. |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
6 |
|
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
7 |
Dynalink samples: |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
8 |
|
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
9 |
* array_stream_linker.js |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
10 |
|
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
11 |
This sample builds ArrayStreamLinkerExporter.java and uses it in a sample script |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
12 |
called "array_stream.js". This linker adds "stream" property to Java array |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
13 |
objects. The "stream" property returns appropriate Stream type for the given |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
14 |
Java array (IntStream, DoubleStream ...). |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
15 |
|
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
16 |
* buffer_indexing_linker.js |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
17 |
|
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
18 |
This sample builds BufferIndexingLinkerExporter.java and uses it in a sample script |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
19 |
called "buffer_index.js". This linker adds array-like indexed access, indexed assignment |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
20 |
and "length" property to Java NIO Buffer objects. Script can treat NIO Buffer objects |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
21 |
as if those are just array objects. |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
22 |
|
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
23 |
* dom_linker.js |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
24 |
|
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
25 |
This sample builds DOMLinkerExporter.java and uses it in a sample script |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
26 |
called "dom_linker_gutenberg.js". This linker handles DOM Element objects to add |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
27 |
properties to access child elements of a given element by child element tag name. |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
28 |
This simplifies script access of parsed XML DOM Documents. |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
29 |
|
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
30 |
* missing_method_linker.js |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
31 |
|
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
32 |
This sample builds MissingMethodLinkerExporter.java and uses it in a sample script |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
33 |
called "missing_method.js". This linker supports Smalltalk-style "doesNotUnderstand" |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
34 |
calls on Java objects. i.e., A Java class can implement MissingMethodHandler interface |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
35 |
with one method named "doesNotUnderstand". When script accesses a method on such |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
36 |
object and if that method does not exist in the Java class (or any of it's supertypes), |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
37 |
then "doesNotUnderstand" method is invoked. |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
38 |
|
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
39 |
* underscore_linker.js |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
40 |
|
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
41 |
This sample builds UnderscoreNameLinkerExporter.java and uses it in a sample script |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
42 |
called "underscore.js". This linker converts underscore separated names to Camel Case |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
43 |
names (as used in Java APIs). You can call Java APIs using Ruby-like naming convention |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
44 |
and this linker converts method names to CamelCase! |
44779bfb4c13
8144841: Add a sample for pluggable dynalink linker for stream property on arrays and a REAMDE for linker samples
sundar
parents:
diff
changeset
|
45 |