Java Nashorn Javascript Library addToArray(final Object array, final Object value)

Here you can find the source of addToArray(final Object array, final Object value)

Description

add To Array

License

Apache License

Declaration

public static void addToArray(final Object array, final Object value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import jdk.nashorn.api.scripting.ScriptObjectMirror;

public class Main {
    public static void addToArray(final Object array, final Object value) {
        ((ScriptObjectMirror) array).callMember("push", value);
    }// w w  w .  ja va  2  s . c o m
}

Related

  1. addToNativeObject(final Object object, final String key, 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)