Java Code Examples for jdk.nashorn.internal.runtime.ScriptFunction#getPrototype()
The following examples show how to use
jdk.nashorn.internal.runtime.ScriptFunction#getPrototype() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: TencentKona-8 File: Global.java License: GNU General Public License v2.0 | 6 votes |
private List<jdk.nashorn.internal.runtime.Property> extractBuiltinProperties(final String name, final ScriptObject func) { final List<jdk.nashorn.internal.runtime.Property> list = new ArrayList<>(); list.addAll(Arrays.asList(func.getMap().getProperties())); if (func instanceof ScriptFunction) { final ScriptObject proto = ScriptFunction.getPrototype((ScriptFunction)func); if (proto != null) { list.addAll(Arrays.asList(proto.getMap().getProperties())); } } final jdk.nashorn.internal.runtime.Property prop = getProperty(name); if (prop != null) { list.add(prop); } return list; }
Example 2
Source Project: openjdk-jdk8u File: Global.java License: GNU General Public License v2.0 | 6 votes |
private List<jdk.nashorn.internal.runtime.Property> extractBuiltinProperties(final String name, final ScriptObject func) { final List<jdk.nashorn.internal.runtime.Property> list = new ArrayList<>(); list.addAll(Arrays.asList(func.getMap().getProperties())); if (func instanceof ScriptFunction) { final ScriptObject proto = ScriptFunction.getPrototype((ScriptFunction)func); if (proto != null) { list.addAll(Arrays.asList(proto.getMap().getProperties())); } } final jdk.nashorn.internal.runtime.Property prop = getProperty(name); if (prop != null) { list.add(prop); } return list; }
Example 3
Source Project: openjdk-8-source File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getObjectPrototype() { return ScriptFunction.getPrototype(builtinObject); }
Example 4
Source Project: openjdk-jdk8u File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getUint8ArrayPrototype() { return ScriptFunction.getPrototype(getBuiltinUint8Array()); }
Example 5
Source Project: nashorn File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getFloat32ArrayPrototype() { return ScriptFunction.getPrototype(builtinFloat32Array); }
Example 6
Source Project: TencentKona-8 File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getNumberPrototype() { return ScriptFunction.getPrototype(builtinNumber); }
Example 7
Source Project: openjdk-jdk8u-backup File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getEvalErrorPrototype() { return ScriptFunction.getPrototype(getBuiltinEvalError()); }
Example 8
Source Project: openjdk-jdk9 File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getSymbolPrototype() { return ScriptFunction.getPrototype(getBuiltinSymbol()); }
Example 9
Source Project: openjdk-jdk9 File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getJavaImporterPrototype() { return ScriptFunction.getPrototype(getBuiltinJavaImporter()); }
Example 10
Source Project: openjdk-jdk8u File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getUint16ArrayPrototype() { return ScriptFunction.getPrototype(getBuiltinUint16Array()); }
Example 11
Source Project: TencentKona-8 File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getRangeErrorPrototype() { return ScriptFunction.getPrototype(getBuiltinRangeError()); }
Example 12
Source Project: openjdk-8-source File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getNumberPrototype() { return ScriptFunction.getPrototype(builtinNumber); }
Example 13
Source Project: openjdk-jdk8u File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getReferenceErrorPrototype() { return ScriptFunction.getPrototype(builtinReferenceError); }
Example 14
Source Project: jdk8u_nashorn File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getBooleanPrototype() { return ScriptFunction.getPrototype(builtinBoolean); }
Example 15
Source Project: openjdk-jdk9 File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getRangeErrorPrototype() { return ScriptFunction.getPrototype(getBuiltinRangeError()); }
Example 16
Source Project: TencentKona-8 File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getJavaImporterPrototype() { return ScriptFunction.getPrototype(getBuiltinJavaImporter()); }
Example 17
Source Project: jdk8u_nashorn File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getRangeErrorPrototype() { return ScriptFunction.getPrototype(getBuiltinRangeError()); }
Example 18
Source Project: openjdk-jdk9 File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getInt16ArrayPrototype() { return ScriptFunction.getPrototype(getBuiltinInt16Array()); }
Example 19
Source Project: nashorn File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getRangeErrorPrototype() { return ScriptFunction.getPrototype(builtinRangeError); }
Example 20
Source Project: hottub File: Global.java License: GNU General Public License v2.0 | 4 votes |
ScriptObject getFloat32ArrayPrototype() { return ScriptFunction.getPrototype(getBuiltinFloat32Array()); }