MCPcopy Create free account
hub / github.com/mozilla/rhino / init

Method init

rhino/src/main/java/org/mozilla/javascript/JavaAdapter.java:62–70  ·  view source on GitHub ↗
(Context cx, VarScope scope, boolean sealed)

Source from the content-addressed store, hash-verified

60 }
61
62 public static void init(Context cx, VarScope scope, boolean sealed) {
63 var ctor = new LambdaConstructor(scope, "JavaAdapter", 1, JavaAdapter::js_createAdapter);
64
65 if (sealed) {
66 ctor.sealObject();
67 }
68
69 ScriptableObject.defineProperty(scope, "JavaAdapter", ctor, DONTENUM);
70 }
71
72 public static Object convertResult(Object result, Class<?> c) {
73 if (result == Undefined.instance

Callers

nothing calls this directly

Calls 2

definePropertyMethod · 0.95
sealObjectMethod · 0.45

Tested by

no test coverage detected