Java Nashorn Javascript Library addToNativeObject(final Object object, final String key, final Object value)

Here you can find the source of addToNativeObject(final Object object, final String key, final Object value)

Description

add To Native Object

License

Open Source License

Declaration

public static void addToNativeObject(final Object object, final String key, final Object value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import jdk.nashorn.internal.runtime.ScriptObject;

public class Main {
    public static void addToNativeObject(final Object object, final String key, final Object value) {
        ((ScriptObject) object).put(key, value, false);
    }/* ww w. j a va 2  s .c  om*/
}

Related

  1. addToArray(final Object array, final Object value)
  2. decode(final Object self, final String string, final boolean component)
  3. encode(final Object self, final String string, final boolean component)
  4. error(final String string, final int index)
  5. escape(Object value)