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

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

?? defaultresolver.java

?? 這是一個有關common beanutils 的源碼
?? JAVA
字號:
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (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.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.commons.beanutils.expression;

/**
 * Default Property Name Expression {@link Resolver} Implementation.
 * <p>
 * This class assists in resolving property names in the following five formats,
 * with the layout of an identifying String in parentheses:
 * <ul>
 * <li><strong>Simple (<code>name</code>)</strong> - The specified
 *     <code>name</code> identifies an individual property of a particular
 *     JavaBean.  The name of the actual getter or setter method to be used
 *     is determined using standard JavaBeans instrospection, so that (unless
 *     overridden by a <code>BeanInfo</code> class, a property named "xyz"
 *     will have a getter method named <code>getXyz()</code> or (for boolean
 *     properties only) <code>isXyz()</code>, and a setter method named
 *     <code>setXyz()</code>.</li>
 * <li><strong>Nested (<code>name1.name2.name3</code>)</strong> The first
 *     name element is used to select a property getter, as for simple
 *     references above.  The object returned for this property is then
 *     consulted, using the same approach, for a property getter for a
 *     property named <code>name2</code>, and so on.  The property value that
 *     is ultimately retrieved or modified is the one identified by the
 *     last name element.</li>
 * <li><strong>Indexed (<code>name[index]</code>)</strong> - The underlying
 *     property value is assumed to be an array, or this JavaBean is assumed
 *     to have indexed property getter and setter methods.  The appropriate
 *     (zero-relative) entry in the array is selected.  <code>List</code>
 *     objects are now also supported for read/write.  You simply need to define
 *     a getter that returns the <code>List</code></li>
 * <li><strong>Mapped (<code>name(key)</code>)</strong> - The JavaBean
 *     is assumed to have an property getter and setter methods with an
 *     additional attribute of type <code>java.lang.String</code>.</li>
 * <li><strong>Combined (<code>name1.name2[index].name3(key)</code>)</strong> -
 *     Combining mapped, nested, and indexed references is also
 *     supported.</li>
 * </ul>
 *
 * @version $Revision: 473888 $ $Date: 2006-11-12 06:21:24 +0000 (Sun, 12 Nov 2006) $
 * @since 1.8.0
 */
public class DefaultResolver implements Resolver {

    private static final char NESTED        = '.';
    private static final char MAPPED_START  = '(';
    private static final char MAPPED_END    = ')';
    private static final char INDEXED_START = '[';
    private static final char INDEXED_END   = ']';

    /**
     * Default Constructor.
     */
    public DefaultResolver() {
    }

    /**
     * Return the index value from the property expression or -1.
     *
     * @param expression The property expression
     * @return The index value or -1 if the property is not indexed
     * @throws IllegalArgumentException If the indexed property is illegally
     * formed or has an invalid (non-numeric) value.
     */
    public int getIndex(String expression) {
        if (expression == null || expression.length() == 0) {
            return -1;
        }
        for (int i = 0; i < expression.length(); i++) {
            char c = expression.charAt(i);
            if (c == NESTED || c == MAPPED_START) {
                return -1;
            } else if (c == INDEXED_START) {
                int end = expression.indexOf(INDEXED_END, i);
                if (end < 0) {
                    throw new IllegalArgumentException("Missing End Delimiter");
                }
                String value = expression.substring(i + 1, end);
                if (value.length() == 0) {
                    throw new IllegalArgumentException("No Index Value");
                }
                int index = 0;
                try {
                    index = Integer.parseInt(value, 10);
                } catch (Exception e) {
                    throw new IllegalArgumentException("Invalid index value '"
                            + value + "'");
                }
                return index;
            }
        }
        return -1;
    }

    /**
     * Return the map key from the property expression or <code>null</code>.
     *
     * @param expression The property expression
     * @return The index value
     * @throws IllegalArgumentException If the mapped property is illegally formed.
     */
    public String getKey(String expression) {
        if (expression == null || expression.length() == 0) {
            return null;
        }
        for (int i = 0; i < expression.length(); i++) {
            char c = expression.charAt(i);
            if (c == NESTED || c == INDEXED_START) {
                return null;
            } else if (c == MAPPED_START) {
                int end = expression.indexOf(MAPPED_END, i);
                if (end < 0) {
                    throw new IllegalArgumentException("Missing End Delimiter");
                }
                return expression.substring(i + 1, end);
            }
        }
        return null;
    }

    /**
     * Return the property name from the property expression.
     *
     * @param expression The property expression
     * @return The property name
     */
    public String getProperty(String expression) {
        if (expression == null || expression.length() == 0) {
            return expression;
        }
        for (int i = 0; i < expression.length(); i++) {
            char c = expression.charAt(i);
            if (c == NESTED) {
                return expression.substring(0, i);
            } else if (c == MAPPED_START || c == INDEXED_START) {
                return expression.substring(0, i);
            }
        }
        return expression;
    }

    /**
     * Indicates whether or not the expression
     * contains nested property expressions or not.
     *
     * @param expression The property expression
     * @return The next property expression
     */
    public boolean hasNested(String expression) {
        if (expression == null || expression.length() == 0) {
            return false;
        } else {
            return (remove(expression) != null);
        }
    }

    /**
     * Indicate whether the expression is for an indexed property or not.
     *
     * @param expression The property expression
     * @return <code>true</code> if the expresion is indexed,
     *  otherwise <code>false</code>
     */
    public boolean isIndexed(String expression) {
        if (expression == null || expression.length() == 0) {
            return false;
        }
        for (int i = 0; i < expression.length(); i++) {
            char c = expression.charAt(i);
            if (c == NESTED || c == MAPPED_START) {
                return false;
            } else if (c == INDEXED_START) {
                return true;
            }
        }
        return false;
    }

    /**
     * Indicate whether the expression is for a mapped property or not.
     *
     * @param expression The property expression
     * @return <code>true</code> if the expresion is mapped,
     *  otherwise <code>false</code>
     */
    public boolean isMapped(String expression) {
        if (expression == null || expression.length() == 0) {
            return false;
        }
        for (int i = 0; i < expression.length(); i++) {
            char c = expression.charAt(i);
            if (c == NESTED || c == INDEXED_START) {
                return false;
            } else if (c == MAPPED_START) {
                return true;
            }
        }
        return false;
    }

    /**
     * Extract the next property expression from the
     * current expression.
     *
     * @param expression The property expression
     * @return The next property expression
     */
    public String next(String expression) {
        if (expression == null || expression.length() == 0) {
            return null;
        }
        boolean indexed = false;
        boolean mapped  = false;
        for (int i = 0; i < expression.length(); i++) {
            char c = expression.charAt(i);
            if (indexed) {
                if (c == INDEXED_END) {
                    return expression.substring(0, i + 1);
                }
            } else if (mapped) {
                if (c == MAPPED_END) {
                    return expression.substring(0, i + 1);
                }
            } else {
                if (c == NESTED) {
                    return expression.substring(0, i);
                } else if (c == MAPPED_START) {
                    mapped = true;
                } else if (c == INDEXED_START) {
                    indexed = true;
                }
            }
        }
        return expression;
    }

    /**
     * Remove the last property expresson from the
     * current expression.
     *
     * @param expression The property expression
     * @return The new expression value, with first property
     * expression removed - null if there are no more expressions
     */
    public String remove(String expression) {
        if (expression == null || expression.length() == 0) {
            return null;
        }
        String property = next(expression);
        if (expression.length() == property.length()) {
            return null;
        }
        int start = property.length();
        if (expression.charAt(start) == NESTED) {
            start++;
        }
        return expression.substring(start);
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成av人片一区二区三区| 欧美体内she精视频| 午夜精品久久久久久久久久久 | 丁香亚洲综合激情啪啪综合| 日本欧美在线观看| 欧美96一区二区免费视频| 五月激情六月综合| 日韩高清一级片| 精品夜夜嗨av一区二区三区| 精品亚洲成av人在线观看| 狠狠色狠狠色综合| 国产成人在线免费观看| 成人a免费在线看| 色欲综合视频天天天| 在线观看视频一区二区欧美日韩| 在线观看亚洲一区| 欧美日韩免费一区二区三区| 欧美一区二区三区播放老司机| 日韩欧美一二三四区| 国产欧美日韩在线视频| 欧美国产日韩在线观看| 亚洲色图在线播放| 日日噜噜夜夜狠狠视频欧美人| 蜜臀av性久久久久蜜臀aⅴ四虎| 久久99国产精品麻豆| a亚洲天堂av| 91精品国产91热久久久做人人| 欧美精品一区二区三| 国产精品另类一区| 午夜天堂影视香蕉久久| 国产精品一区二区视频| 日本精品免费观看高清观看| 欧美高清视频在线高清观看mv色露露十八 | 国产成人av自拍| 91日韩在线专区| 91精品国产黑色紧身裤美女| 中文字幕乱码亚洲精品一区| 亚洲欧美日韩中文播放| 美女诱惑一区二区| 91麻豆免费观看| 欧美日韩成人激情| 国产精品久久久久久久久果冻传媒| 亚洲精品视频免费看| 国产综合久久久久久鬼色| 成人精品电影在线观看| 欧美一级精品在线| 2023国产一二三区日本精品2022| 精品日本一线二线三线不卡| 国产精品色呦呦| 图片区小说区区亚洲影院| 国产成人av在线影院| 欧美日韩精品欧美日韩精品一| 国产欧美精品区一区二区三区 | 7777女厕盗摄久久久| 中文子幕无线码一区tr| 久久99热国产| 欧美日韩在线不卡| 欧美韩国日本不卡| 琪琪一区二区三区| 在线看国产一区二区| 国产精品视频麻豆| 亚洲电影一级片| 国产一区二区三区蝌蚪| 精品视频在线看| 一区二区三区中文免费| 国产成人av在线影院| 久久伊人蜜桃av一区二区| 久久精品国产精品亚洲精品 | 欧美疯狂做受xxxx富婆| 国产精品免费久久| 久久99国产精品免费网站| 精品视频一区三区九区| 欧美精彩视频一区二区三区| 五月综合激情日本mⅴ| 91免费国产在线观看| 国产精品色婷婷| 丁香网亚洲国际| 国产欧美日本一区视频| 国产69精品久久久久毛片| 欧美成人乱码一区二区三区| 精品一区二区三区av| 欧洲亚洲精品在线| 亚洲线精品一区二区三区八戒| 欧美优质美女网站| 性做久久久久久久久| 欧美一级午夜免费电影| 日韩精品视频网站| 制服丝袜激情欧洲亚洲| 久国产精品韩国三级视频| 精品久久一区二区三区| 激情久久五月天| 精品999在线播放| 国产精品一区二区三区99| 久久精品亚洲一区二区三区浴池| 国产自产v一区二区三区c| 精品美女一区二区| 国产精品中文有码| 专区另类欧美日韩| 欧美美女喷水视频| 日韩影院精彩在线| 2014亚洲片线观看视频免费| 国产jizzjizz一区二区| 亚洲一区二区综合| 精品国产乱码久久久久久影片| 国产精品亚洲成人| 亚洲日本va在线观看| 欧美一区二区私人影院日本| 成人黄色小视频在线观看| 亚洲精品国产高清久久伦理二区| 678五月天丁香亚洲综合网| 激情小说亚洲一区| 亚洲蜜桃精久久久久久久| 日韩欧美aaaaaa| 91麻豆国产福利在线观看| 日韩高清电影一区| 国产精品久久精品日日| 日韩视频一区二区在线观看| 国产成人免费高清| 一区二区三区不卡视频在线观看| 日韩欧美黄色影院| 成人短视频下载| 亚洲国产aⅴ天堂久久| 国产日产欧美一区| 欧美另类一区二区三区| 国产专区欧美精品| 亚洲成人免费电影| 亚洲三级小视频| 久久综合狠狠综合| 色婷婷综合久久久中文字幕| 激情小说欧美图片| 亚洲啪啪综合av一区二区三区| 欧美日韩久久一区二区| 顶级嫩模精品视频在线看| 奇米影视7777精品一区二区| 久久精品欧美一区二区三区麻豆| 91丨porny丨蝌蚪视频| 成人中文字幕合集| 国产一区在线观看视频| 日本成人在线一区| 午夜精品视频在线观看| 亚洲国产一区二区三区青草影视| 中文字幕一区免费在线观看| 久久久久久综合| 欧美精品一区二区在线观看| 欧美丰满高潮xxxx喷水动漫| 在线看国产一区| 欧洲视频一区二区| 在线观看av一区| 色呦呦网站一区| 欧日韩精品视频| 色婷婷国产精品| 在线观看91精品国产入口| av影院午夜一区| 成人爱爱电影网址| 成人黄色小视频| 成人综合婷婷国产精品久久免费| 国产在线精品免费| 日韩精品福利网| 捆绑调教一区二区三区| 日本在线不卡一区| 免费观看30秒视频久久| 亚洲国产精品精华液网站| 天天色综合成人网| 日韩av一区二区三区四区| 日本成人超碰在线观看| 美女一区二区视频| 久久国产精品99久久久久久老狼| 久久国产精品色| 国产98色在线|日韩| 91色视频在线| 欧美剧情电影在线观看完整版免费励志电影| 色婷婷激情综合| 欧美一区二区三区爱爱| 国产午夜亚洲精品羞羞网站| 亚洲欧洲国产专区| 五月婷婷色综合| 韩国理伦片一区二区三区在线播放| 精品亚洲成a人| 91丝袜高跟美女视频| 欧美日韩一区二区三区四区五区| 欧美一区二区精品在线| 2023国产一二三区日本精品2022| 18成人在线观看| 狂野欧美性猛交blacked| 成人app在线观看| 欧美性色黄大片手机版| 欧美大尺度电影在线| 国产精品免费观看视频| 日本不卡免费在线视频| 成人av资源在线观看| 91精品国产一区二区| 国产欧美日韩亚州综合| 亚洲成av人片在www色猫咪| 国产乱子轮精品视频| 色综合久久88色综合天天免费| 欧美精品日韩一区| 精品久久久久久久久久久久包黑料| 欧美国产一区二区| 免费观看在线色综合| 99re66热这里只有精品3直播 |