PM
To: nashorn-dev@openjdk.java.net
Subject: Re: Docs/examples for JSAdapter
Rick, have you considered writing a wrapper library in pure JavaScript over the
harsher Java-written API? Users won't even have to know that Java is being
called behind the scenes.
It's much more natural to write
Rick, have you considered writing a wrapper library in pure JavaScript
over the harsher Java-written API? Users won't even have to know that
Java is being called behind the scenes.
It's much more natural to write such things in JavaScript, and it would
also be more portable to other JS engines
-Original Message-
From: nashorn-dev-boun...@openjdk.java.net
[mailto:nashorn-dev-boun...@openjdk.java.net] On Behalf Of Rick Bullotta
Sent: Tuesday, October 22, 2013 12:54 PM
To: Attila Szegedi
Cc: nashorn-dev@openjdk.java.net
Subject: RE: Docs/examples for JSAdapter
Cool. Any examples out th
PM
To: nashorn-dev@openjdk.java.net
Subject: Re: Docs/examples for JSAdapter
It is possible to subclass jdk.nashorn.api.scripting.JSObject by an arbitrary
Java class. Such a class will be linked by a special dynalink linker. Script
can do normal obj.foo, obj.bar() etc. and these would be rout
legant, and GREATLY
simplifies the user's experience.
From: Jim Laskey (Oracle) [mailto:james.las...@oracle.com]
Sent: Tuesday, October 22, 2013 12:34 PM
To: Rick Bullotta
Cc: nashorn-dev@openjdk.java.net
Subject: Re: Docs/examples for JSAdapter
In Nashorn, there is no need to wrap classe
-
From: Attila Szegedi [mailto:attila.szeg...@oracle.com]
Sent: Tuesday, October 22, 2013 12:51 PM
To: Rick Bullotta
Cc: A. Sundararajan; nashorn-dev@openjdk.java.net
Subject: Re: Docs/examples for JSAdapter
You should be able to use your own subclasses of
jdk.nashorn.api.scripting.JSObject for this
ther trivial, to be honest.
>
>
> -Original Message-
> From: nashorn-dev-boun...@openjdk.java.net
> [mailto:nashorn-dev-boun...@openjdk.java.net] On Behalf Of A. Sundararajan
> Sent: Tuesday, October 22, 2013 12:33 PM
> To: nashorn-dev@openjdk.java.net
> Subject: Re:
33 PM
To: nashorn-dev@openjdk.java.net
Subject: Re: Docs/examples for JSAdapter
No. Nashorn uses wrapperless Java objects. Java objects are exposed to scripts
"as is" - no wrapping as 'script objects' as in Rhino.
It is possible to implement Java interfaces in script (j
ce.
From: Jim Laskey (Oracle) [mailto:james.las...@oracle.com]
Sent: Tuesday, October 22, 2013 12:34 PM
To: Rick Bullotta
Cc: nashorn-dev@openjdk.java.net
Subject: Re: Docs/examples for JSAdapter
In Nashorn, there is no need to wrap classes/types in JavaScript objects. You
can work with them directly
gister custom adapters in a “wrap factory” that tells the
> script engine to use these adapters for accessing instances of those
> classes/types. What’s the analog in Nashorn? Can custom types implement
> interfaces that Nashorn will use?
>
> From: Jim Laskey (Oracle) [mailto:j
m Laskey (Oracle) [mailto:james.las...@oracle.com]
Sent: Tuesday, October 22, 2013 11:52 AM
To: Rick Bullotta
Cc: nashorn-dev@openjdk.java.net
Subject: Re: Docs/examples for JSAdapter
In general the Nashorn docs start here.
https://wiki.openjdk.java.net/display/Nashorn/Nashorn+Documentation, but as yo
ailto:james.las...@oracle.com]
Sent: Tuesday, October 22, 2013 11:52 AM
To: Rick Bullotta
Cc: nashorn-dev@openjdk.java.net
Subject: Re: Docs/examples for JSAdapter
In general the Nashorn docs start here.
https://wiki.openjdk.java.net/display/Nashorn/Nashorn+Documentation, but as you
point out
In general the Nashorn docs start here.
https://wiki.openjdk.java.net/display/Nashorn/Nashorn+Documentation, but as you
point out, we seem to be lacking JSAdapter details. I should start an FAQ.
From the javadoc (cd make; ant javadoc # ./dist/javadoc/index.html)
public final class NativeJSAdap
13 matches
Mail list logo