[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-nashorn-dev
Subject: Re:expose custome object or function to script environementt
From: buddhi mihara <buddhi.mihara () live ! com>
Date: 2014-02-05 8:46:17
Message-ID: COL131-W871159458EFA41BFB4770C85950 () phx ! gbl
[Download RAW message or body]
what i mean is without using javascript we can use java to expose scriptObject to \
javascript environment.(just like Math Object. ). i need to add a function as a \
property of that function.(like abs function in Math Object). so i add a property \
called bind to my process object and when user ask var foo = process.bind(param); i \
create a new object of bind class.(bind class is a class which inherits from JSObject \
class).what i ask is think if i need to add multiple function to scriptObject process \
in java level do i need to write a separate class which inherits from JSObject, for \
each of that function or is there any alternatives. i asked this because in every \
global object like Math.oracle use following structure @Function(attributes = \
Attribute.NOT_ENUMERABLE) public static Object toString(final Object self) { \
return getBoolean(self).toString(); } i want to attach all the function to process \
object in java level thank you =
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic