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

Method key

rhino/src/main/java/org/mozilla/javascript/NativeMap.java:285–294  ·  view source on GitHub ↗

Extracts the key from the first args entry if any and takes care of the Delegator. This is used by NativeSet, NativeWeakMap, and NativeWekSet also. @param args the args @return the first argument (de-delegated) or undefined if there is no element in args

(Object[] args)

Source from the content-addressed store, hash-verified

283 * @return the first argument (de-delegated) or undefined if there is no element in args
284 */
285 static Object key(Object[] args) {
286 if (args.length > 0) {
287 Object key = args[0];
288 if (key instanceof Delegator) {
289 return ((Delegator) key).getDelegee();
290 }
291 return key;
292 }
293 return Undefined.instance;
294 }
295}

Callers 15

jsConstructorMethod · 0.95
js_deleteMethod · 0.95
js_getMethod · 0.95
js_hasMethod · 0.95
js_setMethod · 0.95
js_constructorMethod · 0.95
js_setMethod · 0.95
js_deleteMethod · 0.95
js_getMethod · 0.95
js_hasMethod · 0.95
jsConstructorMethod · 0.95
js_addMethod · 0.95

Calls 1

getDelegeeMethod · 0.80

Tested by

no test coverage detected