亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? nativejavamethod.java

?? 主要的怎么樣結(jié)合java 和 javascript!
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * The contents of this file are subject to the Netscape Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/NPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is Rhino code, released * May 6, 1999. * * The Initial Developer of the Original Code is Netscape * Communications Corporation.  Portions created by Netscape are * Copyright (C) 1997-1999 Netscape Communications Corporation. All * Rights Reserved. * * Contributor(s): * Norris Boyd * Frank Mitchell * Mike Shaver * * Alternatively, the contents of this file may be used under the * terms of the GNU Public License (the "GPL"), in which case the * provisions of the GPL are applicable instead of those above. * If you wish to allow use of your version of this file only * under the terms of the GPL and not to allow others to use your * version of this file under the NPL, indicate your decision by * deleting the provisions above and replace them with the notice * and other provisions required by the GPL.  If you do not delete * the provisions above, a recipient may use your version of this * file under either the NPL or the GPL. */package org.mozilla.javascript;import java.lang.reflect.*;/** * This class reflects Java methods into the JavaScript environment and * handles overloading of methods. * * @author Mike Shaver * @see NativeJavaArray * @see NativeJavaPackage * @see NativeJavaClass */public class NativeJavaMethod extends BaseFunction{    static final long serialVersionUID = -3440381785576412928L;    NativeJavaMethod(MemberBox[] methods)    {        this.functionName = methods[0].getName();        this.methods = methods;    }    NativeJavaMethod(MemberBox method, String name)    {        this.functionName = name;        this.methods = new MemberBox[] { method };    }    public NativeJavaMethod(Method method, String name)    {        this(new MemberBox(method), name);    }    public String getFunctionName()    {        return functionName;    }    static String scriptSignature(Object[] values)    {        StringBuffer sig = new StringBuffer();        for (int i = 0; i != values.length; ++i) {            Object value = values[i];            String s;            if (value == null) {                s = "null";            } else if (value instanceof Boolean) {                s = "boolean";            } else if (value instanceof String) {                s = "string";            } else if (value instanceof Number) {                s = "number";            } else if (value instanceof Scriptable) {                if (value instanceof Undefined) {                    s = "undefined";                } else if (value instanceof Wrapper) {                    Object wrapped = ((Wrapper)value).unwrap();                    s = wrapped.getClass().getName();                } else if (value instanceof Function) {                    s = "function";                } else {                    s = "object";                }            } else {                s = JavaMembers.javaSignature(value.getClass());            }            if (i != 0) {                sig.append(',');            }            sig.append(s);        }        return sig.toString();    }    String decompile(int indent, int flags)    {        StringBuffer sb = new StringBuffer();        boolean justbody = (0 != (flags & Decompiler.ONLY_BODY_FLAG));        if (!justbody) {            sb.append("function ");            sb.append(getFunctionName());            sb.append("() {");        }        sb.append("/*\n");        sb.append(toString());        sb.append(justbody ? "*/\n" : "*/}\n");        return sb.toString();    }    public String toString()    {        StringBuffer sb = new StringBuffer();        for (int i = 0, N = methods.length; i != N; ++i) {            Method method = methods[i].method();            sb.append(JavaMembers.javaSignature(method.getReturnType()));            sb.append(' ');            sb.append(method.getName());            sb.append(JavaMembers.liveConnectSignature(methods[i].argTypes));            sb.append('\n');        }        return sb.toString();    }    public Object call(Context cx, Scriptable scope, Scriptable thisObj,                       Object[] args)    {        // Find a method that matches the types given.        if (methods.length == 0) {            throw new RuntimeException("No methods defined for call");        }        int index = findFunction(cx, methods, args);        if (index < 0) {            Class c = methods[0].method().getDeclaringClass();            String sig = c.getName() + '.' + getFunctionName() + '(' +                         scriptSignature(args) + ')';            throw Context.reportRuntimeError1("msg.java.no_such_method", sig);        }        MemberBox meth = methods[index];        Class[] argTypes = meth.argTypes;        // First, we marshall the args.        Object[] origArgs = args;        for (int i = 0; i < args.length; i++) {            Object arg = args[i];            Object coerced = Context.jsToJava(arg, argTypes[i]);            if (coerced != arg) {                if (origArgs == args) {                    args = (Object[])args.clone();                }                args[i] = coerced;            }        }        Object javaObject;        if (meth.isStatic()) {            javaObject = null;  // don't need an object        } else {            Scriptable o = thisObj;            Class c = meth.getDeclaringClass();            for (;;) {                if (o == null) {                    throw Context.reportRuntimeError3(                        "msg.nonjava.method", getFunctionName(),                        ScriptRuntime.toString(thisObj), c.getName());                }                if (o instanceof Wrapper) {                    javaObject = ((Wrapper)o).unwrap();                    if (c.isInstance(javaObject)) {                        break;                    }                }                o = o.getPrototype();            }        }        if (debug) {            printDebug("Calling ", meth, args);        }        Object retval = meth.invoke(javaObject, args);        Class staticType = meth.method().getReturnType();        if (debug) {            Class actualType = (retval == null) ? null                                                : retval.getClass();            System.err.println(" ----- Returned " + retval +                               " actual = " + actualType +                               " expect = " + staticType);        }        Object wrapped = cx.getWrapFactory().wrap(cx, scope,                                                  retval, staticType);        if (debug) {            Class actualType = (wrapped == null) ? null                                                 : wrapped.getClass();            System.err.println(" ----- Wrapped as " + wrapped +                               " class = " + actualType);        }        if (wrapped == null && staticType == Void.TYPE) {            wrapped = Undefined.instance;        }        return wrapped;    }    /**     * Find the index of the correct function to call given the set of methods     * or constructors and the arguments.     * If no function can be found to call, return -1.     */    static int findFunction(Context cx,                            MemberBox[] methodsOrCtors, Object[] args)    {        if (methodsOrCtors.length == 0) {            return -1;        } else if (methodsOrCtors.length == 1) {            MemberBox member = methodsOrCtors[0];            Class[] argTypes = member.argTypes;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久久免费视频了| 色av综合在线| 国产美女主播视频一区| 亚洲人吸女人奶水| 亚洲天堂av一区| 亚洲精品成人在线| 亚洲电影一区二区三区| 国产精品久久久久久亚洲毛片 | 国产丝袜在线精品| 777欧美精品| 欧美va天堂va视频va在线| 精品日本一线二线三线不卡| 欧美xxxx老人做受| 日本一区二区电影| 日韩精品一卡二卡三卡四卡无卡| 日韩精品色哟哟| 国产高清不卡一区| 欧美亚洲国产一区二区三区va| 欧美伦理视频网站| 久久久久久久av麻豆果冻| 亚洲精品国产无天堂网2021 | 99免费精品视频| 91精品国产综合久久国产大片| wwwwww.欧美系列| 亚洲小少妇裸体bbw| 国产99精品国产| 在线播放日韩导航| 综合欧美亚洲日本| 国产真实精品久久二三区| 色94色欧美sute亚洲线路一ni| 欧美人与禽zozo性伦| 国产精品久久久久影视| 激情综合色播五月| 精品国产乱码91久久久久久网站| 一区二区视频在线看| av激情成人网| 国产精品三级av| 懂色av一区二区三区蜜臀| 91精品免费观看| 日韩在线卡一卡二| 91精品国产色综合久久不卡电影| 17c精品麻豆一区二区免费| 国产一区二区三区四区在线观看 | 国产色爱av资源综合区| 青青草国产精品亚洲专区无| 亚洲一区二区欧美日韩| 日本中文字幕一区二区有限公司| 91片在线免费观看| 亚洲国产一区二区三区| 色婷婷久久久亚洲一区二区三区| 中文字幕一区免费在线观看| 成人免费毛片片v| 亚洲精品视频一区二区| 欧洲中文字幕精品| 蜜桃视频一区二区三区在线观看| 51久久夜色精品国产麻豆| 国产一区欧美二区| 一区二区三区91| 日韩一级片在线观看| 国产二区国产一区在线观看| 中文字幕一区二区三区不卡在线 | 日韩欧美中文一区二区| 韩国v欧美v日本v亚洲v| 国产精品免费免费| 欧美一区日韩一区| 岛国精品在线观看| 日日嗨av一区二区三区四区| 日本一区二区三区国色天香| 欧美日韩亚洲综合在线| 国产乱码精品一区二区三区忘忧草| 中日韩免费视频中文字幕| 欧美图片一区二区三区| 国产精品 欧美精品| 日韩中文欧美在线| 性欧美疯狂xxxxbbbb| 国产精品国产三级国产aⅴ中文 | 亚洲综合在线五月| 久久人人爽人人爽| 欧美一区二区三区四区高清| 色综合网色综合| 成人免费视频一区| 福利一区在线观看| 成人午夜免费av| 国产福利精品导航| 成人av网站免费| 成人激情午夜影院| 91在线一区二区| 成人aaaa免费全部观看| 成人黄色片在线观看| 成人白浆超碰人人人人| 国产91露脸合集magnet| 高清不卡在线观看| 91污片在线观看| 不卡的av中国片| 成人a免费在线看| 在线影视一区二区三区| 欧美剧情片在线观看| 4438x亚洲最大成人网| 欧美成人一区二区三区片免费| 欧美一区二区三级| 欧美国产日韩一二三区| 中文字幕一区二区三区在线播放| 亚洲少妇30p| 亚洲欧美一区二区久久| 555www色欧美视频| 欧美视频三区在线播放| 91精品国产福利在线观看| 久久理论电影网| 亚洲自拍另类综合| 久久av老司机精品网站导航| 国产盗摄精品一区二区三区在线| av在线播放不卡| 日韩一二在线观看| 一区二区三区四区激情| 精品一区二区三区免费视频| 成人一道本在线| 欧美成人精精品一区二区频| 国产精品第四页| 久久99精品久久久久久动态图 | 欧美成人精品高清在线播放| 中国av一区二区三区| 麻豆久久久久久| 欧美日免费三级在线| 亚洲欧洲日产国码二区| 精品在线亚洲视频| 日韩色在线观看| 免费观看成人av| 8v天堂国产在线一区二区| 亚洲一级电影视频| 欧美亚洲综合在线| 亚洲亚洲精品在线观看| 欧美日韩一区中文字幕| 亚洲激情男女视频| 91影院在线免费观看| 亚洲人成网站影音先锋播放| 不卡的电影网站| 亚洲欧美日韩一区二区| thepron国产精品| 伊人婷婷欧美激情| 欧美视频中文字幕| 天天色天天操综合| 久久影视一区二区| 不卡的av电影| 亚洲成人手机在线| 精品国产91久久久久久久妲己| 国产中文字幕一区| 中文字幕人成不卡一区| 一本久久精品一区二区| 午夜国产精品影院在线观看| 日韩欧美三级在线| 国产成人在线观看免费网站| 日韩美女视频一区二区| 91麻豆精品国产综合久久久久久| 国产曰批免费观看久久久| 日韩伦理av电影| 日韩一区二区三区观看| 91丨porny丨首页| 老汉av免费一区二区三区| 中文字幕亚洲欧美在线不卡| 777色狠狠一区二区三区| 成人国产精品免费网站| 日本一区中文字幕| 亚洲视频精选在线| 久久精品一区二区三区不卡| 欧美主播一区二区三区美女| 国产激情一区二区三区桃花岛亚洲| 欧美激情在线看| 精品欧美黑人一区二区三区| 91免费观看国产| 国产91高潮流白浆在线麻豆 | 国产精品一线二线三线| 午夜精品一区二区三区三上悠亚| 亚洲国产成人私人影院tom| 欧美xfplay| 精品国产精品一区二区夜夜嗨| 99久久99精品久久久久久 | 国产精品系列在线播放| 日韩激情视频网站| 午夜精品视频一区| 天使萌一区二区三区免费观看| 日韩理论在线观看| 尤物av一区二区| 亚洲精品免费看| 亚洲国产日韩综合久久精品| 一区二区三区国产| 午夜精品久久久| 国内久久婷婷综合| www.日韩在线| 欧美日韩国产综合一区二区三区 | 亚洲日本成人在线观看| 亚洲欧美成aⅴ人在线观看| 亚洲伦在线观看| 午夜精品久久久久影视| 免费高清在线一区| av影院午夜一区| 日韩欧美在线观看一区二区三区| 欧美成人一区二区三区在线观看 | 国内成人自拍视频| 91免费视频网址| 精品福利一区二区三区免费视频|