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

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

?? nativestring.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): * Tom Beauvais * Norris Boyd * Mike McCabe * * 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;/** * This class implements the String native object. * * See ECMA 15.5. * * String methods for dealing with regular expressions are * ported directly from C. Latest port is from version 1.40.12.19 * in the JSFUN13_BRANCH. * * @author Mike McCabe * @author Norris Boyd */final class NativeString extends IdScriptableObject{    static final long serialVersionUID = 920268368584188687L;    private static final Object STRING_TAG = new Object();    static void init(Scriptable scope, boolean sealed)    {        NativeString obj = new NativeString("");        obj.exportAsJSClass(MAX_PROTOTYPE_ID, scope, sealed);    }    private NativeString(String s) {        string = s;    }    public String getClassName() {        return "String";    }    private static final int        Id_length                    =  1,        MAX_INSTANCE_ID              =  1;    protected int getMaxInstanceId()    {        return MAX_INSTANCE_ID;    }    protected int findInstanceIdInfo(String s)    {        if (s.equals("length")) {            return instanceIdInfo(DONTENUM | READONLY | PERMANENT, Id_length);        }        return super.findInstanceIdInfo(s);    }    protected String getInstanceIdName(int id)    {        if (id == Id_length) { return "length"; }        return super.getInstanceIdName(id);    }    protected Object getInstanceIdValue(int id)    {        if (id == Id_length) {            return ScriptRuntime.wrapInt(string.length());        }        return super.getInstanceIdValue(id);    }    protected void fillConstructorProperties(IdFunctionObject ctor)    {        addIdFunctionProperty(ctor, STRING_TAG, ConstructorId_fromCharCode,                              "fromCharCode", 1);        super.fillConstructorProperties(ctor);    }    protected void initPrototypeId(int id)    {        String s;        int arity;        switch (id) {          case Id_constructor:      arity=1; s="constructor";      break;          case Id_toString:         arity=0; s="toString";         break;          case Id_toSource:         arity=0; s="toSource";         break;          case Id_valueOf:          arity=0; s="valueOf";          break;          case Id_charAt:           arity=1; s="charAt";           break;          case Id_charCodeAt:       arity=1; s="charCodeAt";       break;          case Id_indexOf:          arity=1; s="indexOf";          break;          case Id_lastIndexOf:      arity=1; s="lastIndexOf";      break;          case Id_split:            arity=2; s="split";            break;          case Id_substring:        arity=2; s="substring";        break;          case Id_toLowerCase:      arity=0; s="toLowerCase";      break;          case Id_toUpperCase:      arity=0; s="toUpperCase";      break;          case Id_substr:           arity=2; s="substr";           break;          case Id_concat:           arity=1; s="concat";           break;          case Id_slice:            arity=2; s="slice";            break;          case Id_bold:             arity=0; s="bold";             break;          case Id_italics:          arity=0; s="italics";          break;          case Id_fixed:            arity=0; s="fixed";            break;          case Id_strike:           arity=0; s="strike";           break;          case Id_small:            arity=0; s="small";            break;          case Id_big:              arity=0; s="big";              break;          case Id_blink:            arity=0; s="blink";            break;          case Id_sup:              arity=0; s="sup";              break;          case Id_sub:              arity=0; s="sub";              break;          case Id_fontsize:         arity=0; s="fontsize";         break;          case Id_fontcolor:        arity=0; s="fontcolor";        break;          case Id_link:             arity=0; s="link";             break;          case Id_anchor:           arity=0; s="anchor";           break;          case Id_equals:           arity=1; s="equals";           break;          case Id_equalsIgnoreCase: arity=1; s="equalsIgnoreCase"; break;          case Id_match:            arity=1; s="match";            break;          case Id_search:           arity=1; s="search";           break;          case Id_replace:          arity=1; s="replace";          break;          default: throw new IllegalArgumentException(String.valueOf(id));        }        initPrototypeMethod(STRING_TAG, id, s, arity);    }    public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope,                             Scriptable thisObj, Object[] args)    {        if (!f.hasTag(STRING_TAG)) {            return super.execIdCall(f, cx, scope, thisObj, args);        }        int id = f.methodId();        switch (id) {          case ConstructorId_fromCharCode: {            int N = args.length;            if (N < 1)                return "";            StringBuffer sb = new StringBuffer(N);            for (int i = 0; i != N; ++i) {                sb.append(ScriptRuntime.toUint16(args[i]));            }            return sb.toString();          }          case Id_constructor: {            String s = (args.length >= 1)                ? ScriptRuntime.toString(args[0]) : "";            if (thisObj == null) {                // new String(val) creates a new String object.                return new NativeString(s);            }            // String(val) converts val to a string value.            return s;          }          case Id_toString:          case Id_valueOf:            // ECMA 15.5.4.2: 'the toString function is not generic.            return realThis(thisObj, f).string;          case Id_toSource: {            String s = realThis(thisObj, f).string;            return "(new String(\""+ScriptRuntime.escapeString(s)+"\"))";          }          case Id_charAt:          case Id_charCodeAt: {             // See ECMA 15.5.4.[4,5]            String target = ScriptRuntime.toString(thisObj);            double pos = ScriptRuntime.toInteger(args, 0);            if (pos < 0 || pos >= target.length()) {                if (id == Id_charAt) return "";                else return ScriptRuntime.NaNobj;            }            char c = target.charAt((int)pos);            if (id == Id_charAt) return String.valueOf(c);            else return ScriptRuntime.wrapInt(c);          }          case Id_indexOf:            return ScriptRuntime.wrapInt(js_indexOf(                ScriptRuntime.toString(thisObj), args));          case Id_lastIndexOf:            return ScriptRuntime.wrapInt(js_lastIndexOf(                ScriptRuntime.toString(thisObj), args));          case Id_split:            return js_split(cx, scope, ScriptRuntime.toString(thisObj), args);          case Id_substring:            return js_substring(cx, ScriptRuntime.toString(thisObj), args);          case Id_toLowerCase:            // See ECMA 15.5.4.11            return ScriptRuntime.toString(thisObj).toLowerCase();          case Id_toUpperCase:            // See ECMA 15.5.4.12            return ScriptRuntime.toString(thisObj).toUpperCase();          case Id_substr:            return js_substr(ScriptRuntime.toString(thisObj), args);          case Id_concat:            return js_concat(ScriptRuntime.toString(thisObj), args);          case Id_slice:            return js_slice(ScriptRuntime.toString(thisObj), args);          case Id_bold:            return tagify(thisObj, "b", null, null);          case Id_italics:            return tagify(thisObj, "i", null, null);          case Id_fixed:            return tagify(thisObj, "tt", null, null);          case Id_strike:            return tagify(thisObj, "strike", null, null);          case Id_small:            return tagify(thisObj, "small", null, null);          case Id_big:            return tagify(thisObj, "big", null, null);          case Id_blink:            return tagify(thisObj, "blink", null, null);          case Id_sup:            return tagify(thisObj, "sup", null, null);          case Id_sub:            return tagify(thisObj, "sub", null, null);          case Id_fontsize:            return tagify(thisObj, "font", "size", args);          case Id_fontcolor:            return tagify(thisObj, "font", "color", args);          case Id_link:            return tagify(thisObj, "a", "href", args);          case Id_anchor:            return tagify(thisObj, "a", "name", args);          case Id_equals:          case Id_equalsIgnoreCase: {            String s1 = ScriptRuntime.toString(thisObj);            String s2 = ScriptRuntime.toString(args, 0);            return ScriptRuntime.wrapBoolean(                (id == Id_equals) ? s1.equals(s2) : s1.equalsIgnoreCase(s2));          }          case Id_match:          case Id_search:          case Id_replace:            {                int actionType;                if (id == Id_match) {                    actionType = RegExpProxy.RA_MATCH;                } else if (id == Id_search) {                    actionType = RegExpProxy.RA_SEARCH;                } else {                    actionType = RegExpProxy.RA_REPLACE;                }                return ScriptRuntime.checkRegExpProxy(cx).                    action(cx, scope, thisObj, args, actionType);            }        }        throw new IllegalArgumentException(String.valueOf(id));    }    private static NativeString realThis(Scriptable thisObj, IdFunctionObject f)    {        if (!(thisObj instanceof NativeString))            throw incompatibleCallError(f);        return (NativeString)thisObj;    }    /*     * HTML composition aids.     */    private static String tagify(Object thisObj, String tag,                                 String attribute, Object[] args)    {        String str = ScriptRuntime.toString(thisObj);        StringBuffer result = new StringBuffer();        result.append('<');        result.append(tag);        if (attribute != null) {            result.append(' ');            result.append(attribute);            result.append("=\"");            result.append(ScriptRuntime.toString(args, 0));            result.append('"');        }        result.append('>');        result.append(str);        result.append("</");        result.append(tag);        result.append('>');        return result.toString();    }    public String toString() {        return string;    }    /* Make array-style property lookup work for strings.     * XXX is this ECMA?  A version check is probably needed. In js too.     */    public Object get(int index, Scriptable start) {        if (0 <= index && index < string.length()) {            return string.substring(index, index + 1);        }        return super.get(index, start);    }    public void put(int index, Scriptable start, Object value) {        if (0 <= index && index < string.length()) {            return;        }        super.put(index, start, value);    }    /*     *     * See ECMA 15.5.4.6.  Uses Java String.indexOf()     * OPT to add - BMH searching from jsstr.c.     */    private static int js_indexOf(String target, Object[] args) {        String search = ScriptRuntime.toString(args, 0);        double begin = ScriptRuntime.toInteger(args, 1);        if (begin > target.length()) {            return -1;        } else {            if (begin < 0)                begin = 0;            return target.indexOf(search, (int)begin);        }    }    /*     *     * See ECMA 15.5.4.7     *     */    private static int js_lastIndexOf(String target, Object[] args) {        String search = ScriptRuntime.toString(args, 0);        double end = ScriptRuntime.toNumber(args, 1);        if (end != end || end > target.length())            end = target.length();        else if (end < 0)            end = 0;        return target.lastIndexOf(search, (int)end);    }    /*     * Used by js_split to find the next split point in target,     * starting at offset ip and looking either for the given     * separator substring, or for the next re match.  ip and     * matchlen must be reference variables (assumed to be arrays of     * length 1) so they can be updated in the leading whitespace or     * re case.     *     * Return -1 on end of string, >= 0 for a valid index of the next     * separator occurrence if found, or the string length if no     * separator is found.     */    private static int find_split(Context cx, Scriptable scope, String target,                                  String separator, int version,                                  RegExpProxy reProxy, Scriptable re,                                  int[] ip, int[] matchlen, boolean[] matched,                                  String[][] parensp)    {        int i = ip[0];        int length = target.length();        /*         * Perl4 special case for str.split(' '), only if the user has selected         * JavaScript1.2 explicitly.  Split on whitespace, and skip leading w/s.         * Strange but true, apparently modeled after awk.         */        if (version == Context.VERSION_1_2 &&            re == null && separator.length() == 1 && separator.charAt(0) == ' ')        {            /* Skip leading whitespace if at front of str. */            if (i == 0) {                while (i < length && Character.isWhitespace(target.charAt(i)))                    i++;                ip[0] = i;            }            /* Don't delimit whitespace at end of string. */            if (i == length)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品三级在线观看| 成人高清视频在线观看| 亚洲一区二区三区小说| 一区二区三区四区不卡视频| 国产精品久久久久四虎| 国产精品人成在线观看免费| 国产亚洲一二三区| 国产人伦精品一区二区| 日本一区二区三区国色天香| 久久久久久久久蜜桃| 久久婷婷久久一区二区三区| www国产成人| 欧美精彩视频一区二区三区| 中文字幕成人在线观看| 亚洲色图欧洲色图| 一区二区三区在线高清| 亚洲成人av资源| 青青草原综合久久大伊人精品 | 亚洲另类在线一区| 一级精品视频在线观看宜春院| 亚洲自拍偷拍网站| 日韩av二区在线播放| 激情五月激情综合网| 国产成a人亚洲精| 91在线高清观看| 欧美日韩一本到| 日韩美女天天操| 亚洲国产岛国毛片在线| 亚洲欧美视频在线观看视频| 亚洲福利视频一区| 男女男精品网站| 国产成人av资源| 欧美色图第一页| 欧美tickling网站挠脚心| 亚洲国产高清在线| 午夜欧美2019年伦理| 国模娜娜一区二区三区| 色婷婷av久久久久久久| 日韩色视频在线观看| 国产精品天干天干在线综合| 亚洲一区自拍偷拍| 国产在线乱码一区二区三区| 91丨九色丨尤物| 91精品国产麻豆国产自产在线| 国产亚洲欧美在线| 亚洲一区二区三区四区在线免费观看| 精品一区二区三区蜜桃| 97久久超碰国产精品电影| 7777精品久久久大香线蕉| 国产欧美一区二区三区网站| 亚洲午夜国产一区99re久久| 国产米奇在线777精品观看| 一本高清dvd不卡在线观看| 日韩美女视频在线| 同产精品九九九| 欧美中文字幕一区| 伊人色综合久久天天| 亚洲欧洲日产国码二区| 日本不卡在线视频| 91香蕉视频污| 久久久亚洲高清| 日韩中文字幕亚洲一区二区va在线| 国产精品456露脸| 69p69国产精品| 亚洲男人天堂一区| 国产福利一区二区三区视频在线| 欧美视频自拍偷拍| 国产精品美女久久久久久久久久久| 日本亚洲电影天堂| 一本大道久久精品懂色aⅴ| 久久精品网站免费观看| 日韩电影一区二区三区| 色婷婷一区二区三区四区| 亚洲一区二区三区四区不卡| 国产精品一区二区在线观看不卡 | 国产99久久久国产精品潘金网站| 欧美视频在线一区| 亚洲免费在线视频一区 二区| 国产揄拍国内精品对白| 91麻豆精品国产91久久久| 亚洲乱码国产乱码精品精可以看| 国产不卡在线播放| 亚洲精品在线网站| 美女视频网站久久| 欧美剧情电影在线观看完整版免费励志电影| 国产精品久久一级| 国产成人午夜视频| 久久一二三国产| 蜜桃久久精品一区二区| 欧美一区二区三区在线| 五月激情丁香一区二区三区| 91激情五月电影| 亚洲欧洲综合另类在线| 91蜜桃在线观看| 亚洲天堂a在线| 成人蜜臀av电影| 国产精品乱人伦| 成人午夜精品一区二区三区| 久久久久久一级片| 国产麻豆视频一区二区| 久久免费午夜影院| 国产麻豆一精品一av一免费| 久久久国产精华| 国产成人三级在线观看| 国产欧美一区二区精品性色超碰| 国产精品综合二区| 国产农村妇女精品| 99久久国产综合色|国产精品| 国产精品乱码一区二区三区软件 | 欧美一区二区视频在线观看| 水野朝阳av一区二区三区| 在线播放国产精品二区一二区四区| 午夜av电影一区| 日韩一区二区三区三四区视频在线观看 | 国产欧美精品一区| 成人黄动漫网站免费app| 亚洲欧洲成人精品av97| 91成人免费在线视频| 午夜精品久久久久久不卡8050| 欧美军同video69gay| 久久成人久久爱| 欧美国产视频在线| 一本一道久久a久久精品| 亚洲国产欧美在线| 日韩视频免费观看高清在线视频| 国产精品综合av一区二区国产馆| 中文字幕乱码一区二区免费| 91网页版在线| 无吗不卡中文字幕| 337p日本欧洲亚洲大胆色噜噜| 国产+成+人+亚洲欧洲自线| 亚洲欧美电影一区二区| 在线不卡的av| 成人一区在线观看| 亚洲午夜精品在线| 一区二区日韩av| 成人午夜视频网站| 久久综合九色欧美综合狠狠| 日韩电影在线免费观看| 久久久精品影视| 色婷婷综合久久久久中文一区二区| 天使萌一区二区三区免费观看| 久久色在线观看| 91国产成人在线| 精品一区二区三区不卡 | 免费观看91视频大全| 日本一区二区三区免费乱视频| 欧美影院午夜播放| 国产精品一区二区在线看| 亚洲欧美国产毛片在线| 精品国产亚洲一区二区三区在线观看 | 风流少妇一区二区| 午夜精品免费在线| 国产精品区一区二区三区| 欧美老肥妇做.爰bbww视频| 成人免费视频免费观看| 日本不卡1234视频| 亚洲猫色日本管| 2023国产精华国产精品| 在线观看欧美精品| 国产成人午夜高潮毛片| 日韩av电影免费观看高清完整版| 亚洲国产高清在线观看视频| 欧美一区二区视频在线观看| 91麻豆国产在线观看| 激情都市一区二区| 亚洲v精品v日韩v欧美v专区| 欧美国产日产图区| 欧美一区二区精美| 99国产精品久久| 国产精一区二区三区| 亚洲福利视频导航| 亚洲欧美日韩精品久久久久| 久久夜色精品一区| 欧美男男青年gay1069videost | 国产精品成人免费精品自在线观看| 欧美精品高清视频| 在线这里只有精品| 不卡视频免费播放| 国产精品自拍一区| 六月婷婷色综合| 天天射综合影视| 一级特黄大欧美久久久| 国产精品不卡一区| 国产日韩欧美在线一区| 日韩欧美aaaaaa| 欧美一级艳片视频免费观看| 欧美色爱综合网| 91成人国产精品| 在线日韩国产精品| 色综合一区二区三区| 99久久精品免费精品国产| 国产精品一区免费在线观看| 国产一区视频在线看| 久久精品国产澳门| 久久精品国产精品青草| 久久精品国产一区二区三| 免费亚洲电影在线| 日韩高清一区二区| 免费在线看一区|