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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? importertoplevel.java

?? 主要的怎么樣結合java 和 javascript!
?? JAVA
字號:
/* -*- 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) 1999 Netscape Communications Corporation. All * Rights Reserved. * * Contributor(s): * Norris Boyd * Igor Bukanov * Matthias Radestock * * 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. */// API classpackage org.mozilla.javascript;/** * Class ImporterTopLevel * * This class defines a ScriptableObject that can be instantiated * as a top-level ("global") object to provide functionality similar * to Java's "import" statement. * <p> * This class can be used to create a top-level scope using the following code: * <pre> *  Scriptable scope = new ImporterTopLevel(cx); * </pre> * Then JavaScript code will have access to the following methods: * <ul> * <li>importClass - will "import" a class by making its unqualified name *                   available as a property of the top-level scope * <li>importPackage - will "import" all the classes of the package by *                     searching for unqualified names as classes qualified *                     by the given package. * </ul> * The following code from the shell illustrates this use: * <pre> * js> importClass(java.io.File) * js> f = new File('help.txt') * help.txt * js> importPackage(java.util) * js> v = new Vector() * [] * * @author Norris Boyd */public class ImporterTopLevel extends IdScriptableObject{    static final long serialVersionUID = -9095380847465315412L;    private static final Object IMPORTER_TAG = new Object();    public ImporterTopLevel() { }    public ImporterTopLevel(Context cx) {        this(cx, false);    }    public ImporterTopLevel(Context cx, boolean sealed)    {        initStandardObjects(cx, sealed);    }    public String getClassName()    {        return (topScopeFlag) ? "global" : "JavaImporter";    }    public static void init(Context cx, Scriptable scope, boolean sealed)    {        ImporterTopLevel obj = new ImporterTopLevel();        obj.exportAsJSClass(MAX_PROTOTYPE_ID, scope, sealed);    }    public void initStandardObjects(Context cx, boolean sealed)    {        // Assume that Context.initStandardObjects initialize JavaImporter        // property lazily so the above init call is not yet called        cx.initStandardObjects(this, sealed);        topScopeFlag = true;        // If seal is true then exportAsJSClass(cx, seal) would seal        // this obj. Since this is scope as well, it would not allow        // to add variables.        IdFunctionObject ctor = exportAsJSClass(MAX_PROTOTYPE_ID, this, false);        if (sealed) {            ctor.sealObject();        }        // delete "constructor" defined by exportAsJSClass so "constructor"        // name would refer to Object.constructor        // and not to JavaImporter.prototype.constructor.        delete("constructor");    }    public boolean has(String name, Scriptable start) {        return super.has(name, start)               || getPackageProperty(name, start) != NOT_FOUND;    }    public Object get(String name, Scriptable start) {        Object result = super.get(name, start);        if (result != NOT_FOUND)            return result;        result = getPackageProperty(name, start);        return result;    }    private Object getPackageProperty(String name, Scriptable start) {        Object result = NOT_FOUND;        Object[] elements;        synchronized (importedPackages) {            elements = importedPackages.toArray();        }        for (int i=0; i < elements.length; i++) {            NativeJavaPackage p = (NativeJavaPackage) elements[i];            Object v = p.getPkgProperty(name, start, false);            if (v != null && !(v instanceof NativeJavaPackage)) {                if (result == NOT_FOUND) {                    result = v;                } else {                    throw Context.reportRuntimeError2(                        "msg.ambig.import", result.toString(), v.toString());                }            }        }        return result;    }    /**     * @deprecated Kept only for compatibility.     */    public void importPackage(Context cx, Scriptable thisObj, Object[] args,                              Function funObj)    {        js_importPackage(args);    }    private Object js_construct(Scriptable scope, Object[] args)    {        ImporterTopLevel result = new ImporterTopLevel();        for (int i = 0; i != args.length; ++i) {            Object arg = args[i];            if (arg instanceof NativeJavaClass) {                result.importClass((NativeJavaClass)arg);            } else if (arg instanceof NativeJavaPackage) {                result.importPackage((NativeJavaPackage)arg);            } else {                throw Context.reportRuntimeError1(                    "msg.not.class.not.pkg", Context.toString(arg));            }        }        // set explicitly prototype and scope        // as otherwise in top scope mode BaseFunction.construct        // would keep them set to null. It also allow to use        // JavaImporter without new and still get properly        // initialized object.        result.setParentScope(scope);        result.setPrototype(this);        return result;    }    private Object js_importClass(Object[] args)    {        for (int i = 0; i != args.length; i++) {            Object arg = args[i];            if (!(arg instanceof NativeJavaClass)) {                throw Context.reportRuntimeError1(                    "msg.not.class", Context.toString(arg));            }            importClass((NativeJavaClass)arg);        }        return Undefined.instance;    }    private Object js_importPackage(Object[] args)    {        for (int i = 0; i != args.length; i++) {            Object arg = args[i];            if (!(arg instanceof NativeJavaPackage)) {                throw Context.reportRuntimeError1(                    "msg.not.pkg", Context.toString(arg));            }            importPackage((NativeJavaPackage)arg);        }        return Undefined.instance;    }    private void importPackage(NativeJavaPackage pkg)    {        synchronized (importedPackages) {            for (int j = 0; j != importedPackages.size(); j++) {                if (pkg == importedPackages.get(j)) {                    pkg = null;                    break;                }            }            if (pkg != null) {                importedPackages.add(pkg);            }        }    }    private void importClass(NativeJavaClass cl)    {        String s = cl.getClassObject().getName();        String n = s.substring(s.lastIndexOf('.')+1);        Object val = get(n, this);        if (val != NOT_FOUND && val != cl) {            throw Context.reportRuntimeError1("msg.prop.defined", n);        }        //defineProperty(n, cl, DONTENUM);        put(n, this, cl);    }    protected void initPrototypeId(int id)    {        String s;        int arity;        switch (id) {          case Id_constructor:   arity=0; s="constructor";   break;          case Id_importClass:   arity=1; s="importClass";   break;          case Id_importPackage: arity=1; s="importPackage"; break;          default: throw new IllegalArgumentException(String.valueOf(id));        }        initPrototypeMethod(IMPORTER_TAG, id, s, arity);    }    public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope,                             Scriptable thisObj, Object[] args)    {        if (!f.hasTag(IMPORTER_TAG)) {            return super.execIdCall(f, cx, scope, thisObj, args);        }        int id = f.methodId();        switch (id) {          case Id_constructor:            return js_construct(scope, args);          case Id_importClass:            return realThis(thisObj, f).js_importClass(args);          case Id_importPackage:            return realThis(thisObj, f).js_importPackage(args);        }        throw new IllegalArgumentException(String.valueOf(id));    }    private ImporterTopLevel realThis(Scriptable thisObj, IdFunctionObject f)    {        if (topScopeFlag) {            // when used as top scope importPackage and importClass are global            // function that ignore thisObj            return this;        }        if (!(thisObj instanceof ImporterTopLevel))            throw incompatibleCallError(f);        return (ImporterTopLevel)thisObj;    }// #string_id_map#    protected int findPrototypeId(String s)    {        int id;// #generated# Last update: 2004-06-08 02:03:11 CEST        L0: { id = 0; String X = null; int c;            int s_length = s.length();            if (s_length==11) {                c=s.charAt(0);                if (c=='c') { X="constructor";id=Id_constructor; }                else if (c=='i') { X="importClass";id=Id_importClass; }            }            else if (s_length==13) { X="importPackage";id=Id_importPackage; }            if (X!=null && X!=s && !X.equals(s)) id = 0;        }// #/generated#        return id;    }    private static final int        Id_constructor          = 1,        Id_importClass          = 2,        Id_importPackage        = 3,        MAX_PROTOTYPE_ID        = 3;// #/string_id_map#    private ObjArray importedPackages = new ObjArray();    private boolean topScopeFlag;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜天堂影视香蕉久久| 国产精品二三区| 奇米色一区二区三区四区| 在线91免费看| 精品亚洲免费视频| 久久色在线视频| 成人网男人的天堂| 亚洲欧美欧美一区二区三区| 欧美午夜宅男影院| 日本vs亚洲vs韩国一区三区二区| 日韩视频不卡中文| 国产激情视频一区二区三区欧美| 国产精品狼人久久影院观看方式| 在线视频你懂得一区| 性做久久久久久| 亚洲精品在线观| 成人激情文学综合网| 亚洲国产wwwccc36天堂| 日韩欧美色电影| eeuss鲁片一区二区三区在线看| 亚洲精品高清在线观看| 日韩欧美在线综合网| 国产aⅴ精品一区二区三区色成熟| 亚洲欧洲美洲综合色网| 91麻豆精品久久久久蜜臀| 国产精品一二一区| 亚洲电影在线免费观看| 国产香蕉久久精品综合网| 色狠狠桃花综合| 亚洲小说春色综合另类电影| 日韩精品一区二区三区视频| eeuss国产一区二区三区| 午夜免费久久看| 久久九九99视频| 欧美这里有精品| 国产一区二三区好的| 一区二区成人在线| 久久女同精品一区二区| 欧美专区在线观看一区| 国产精品自拍毛片| 石原莉奈在线亚洲三区| 中文一区二区在线观看| 欧美一区二区网站| 色偷偷一区二区三区| 激情欧美一区二区三区在线观看| 亚洲国产日韩av| 国产精品看片你懂得| 亚洲精品在线三区| 日韩一区二区三区在线观看| 在线一区二区三区四区| 成人午夜伦理影院| 久久99久久精品| 亚洲成人777| 樱花影视一区二区| 中文字幕成人av| 精品国产乱码久久久久久牛牛 | 粉嫩高潮美女一区二区三区| 日本成人在线电影网| 亚洲人成网站影音先锋播放| 欧美国产日韩一二三区| 久久久三级国产网站| 日韩久久免费av| 欧美日韩国产一级| 欧美性videosxxxxx| 色综合欧美在线| 色综合久久久久久久久| a在线播放不卡| 成人av网站免费| 岛国一区二区三区| 国产不卡在线播放| 国产精品一级片在线观看| 九九热在线视频观看这里只有精品| 午夜精品久久久久久不卡8050 | 亚洲成人你懂的| 夜夜精品浪潮av一区二区三区| 亚洲国产成人在线| 国产精品视频九色porn| 国产精品美女久久久久久| 国产精品亲子伦对白| 欧美极品少妇xxxxⅹ高跟鞋 | 综合久久久久久久| 亚洲欧美日韩在线不卡| 亚洲裸体在线观看| 亚洲永久精品大片| 午夜精品福利一区二区蜜股av | 欧美成人vr18sexvr| 日韩精品最新网址| 久久先锋影音av鲁色资源| 久久久高清一区二区三区| 久久久91精品国产一区二区精品| 中文字幕不卡的av| 亚洲日本一区二区| 亚洲一区在线视频| 人人爽香蕉精品| 国产乱码精品一区二区三区忘忧草 | 久久先锋资源网| 国产精品区一区二区三区| 亚洲欧美国产高清| 亚洲成人黄色小说| 久久99久久精品| 波多野结衣亚洲一区| 在线精品视频一区二区| 欧美一区二区三区人| 久久精品夜色噜噜亚洲aⅴ| 日韩美女精品在线| 五月天中文字幕一区二区| 蜜臀久久99精品久久久画质超高清 | 五月婷婷欧美视频| 国产乱国产乱300精品| 色综合天天综合在线视频| 91麻豆精品国产无毒不卡在线观看 | 看电视剧不卡顿的网站| 高清不卡一区二区在线| 欧洲精品一区二区| 欧美精品一区二区三| 亚洲人成网站在线| 韩国女主播一区二区三区| 91亚洲午夜精品久久久久久| 91精品国产欧美一区二区成人| 久久久不卡影院| 日韩精品一级中文字幕精品视频免费观看| 麻豆成人av在线| 色爱区综合激月婷婷| 精品精品国产高清一毛片一天堂| 亚洲色图欧美偷拍| 久久99久久久久| 色999日韩国产欧美一区二区| 精品久久久久久无| 亚洲精品视频在线| 国产iv一区二区三区| 欧美精品久久久久久久久老牛影院| 国产精品天干天干在线综合| 奇米精品一区二区三区四区 | 91色视频在线| 欧美成人r级一区二区三区| 一区二区三区在线高清| 成人午夜视频在线观看| 26uuu精品一区二区| 亚洲国产一区二区三区| 成人高清在线视频| 国产午夜亚洲精品羞羞网站| 男男视频亚洲欧美| 91成人在线观看喷潮| 中文字幕制服丝袜成人av| 韩国女主播成人在线| 91精品国产色综合久久ai换脸 | 欧美精三区欧美精三区| 中文字幕一区二区三区不卡| 国产一区日韩二区欧美三区| 日韩欧美精品在线视频| 午夜欧美视频在线观看| 91久久国产综合久久| 国产精品乱码人人做人人爱| 国产一区激情在线| 欧美电影免费观看高清完整版在线| 亚洲成人一二三| 欧美女孩性生活视频| 亚洲一区在线观看网站| 色婷婷精品大在线视频| 亚洲色图清纯唯美| 99久久免费视频.com| 日本一区二区三区国色天香| 国产综合久久久久久鬼色 | 欧美日韩久久久一区| 依依成人精品视频| 色偷偷88欧美精品久久久| 日韩伦理电影网| 欧美影院一区二区| 亚洲高清三级视频| 5858s免费视频成人| 视频在线在亚洲| 日韩一级完整毛片| 精品一区二区三区在线观看| 欧美va亚洲va在线观看蝴蝶网| 乱一区二区av| 国产午夜精品一区二区三区视频 | 精品一区二区三区蜜桃| 精品国产乱码久久久久久牛牛| 国内精品伊人久久久久影院对白| 久久久www免费人成精品| 国产成人午夜电影网| 国产精品天美传媒| 色噜噜狠狠色综合欧洲selulu| 亚洲福利视频导航| 精品国产一区二区三区忘忧草| 激情偷乱视频一区二区三区| 欧美高清在线精品一区| 91最新地址在线播放| 亚洲成人免费在线观看| 欧美变态tickling挠脚心| 国产精品99久久久久久有的能看| 国产欧美日本一区视频| 99re成人精品视频| 丝袜诱惑亚洲看片| 久久女同性恋中文字幕| 99精品黄色片免费大全| 天天免费综合色| 久久精品一区二区三区av| 91成人在线观看喷潮| 国产在线精品一区二区不卡了|