Here you can find the source of isNativeObject(final Object value)
public static boolean isNativeObject(final Object value)
//package com.java2s; //License from project: Open Source License import jdk.nashorn.internal.runtime.ScriptObject; public class Main { public static boolean isNativeObject(final Object value) { return (value instanceof ScriptObject) && !isNativeArray(value); }/* ww w . ja va 2s. com*/ public static boolean isNativeArray(final Object value) { return (value instanceof ScriptObject) && ((ScriptObject) value).isArray(); } }