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

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

?? hierarchicalconfigurationconverter.java

?? 解觖java技術中后臺無法上傳數給的情況
?? JAVA
字號:
package net.myvietnam.mvncore.configuration;

/* ====================================================================
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *    any, must include the following acknowledgement:
 *       "This product includes software developed by the
 *        Apache Software Foundation (http://www.apache.org/)."
 *    Alternately, this acknowledgement may appear in the software itself,
 *    if and wherever such third-party acknowledgements normally appear.
 *
 * 4. The names "The Jakarta Project", "Commons", and "Apache Software
 *    Foundation" must not be used to endorse or promote products derived
 *    from this software without prior written permission. For written
 *    permission, please contact apache@apache.org.
 *
 * 5. Products derived from this software may not be called "Apache"
 *    nor may "Apache" appear in their names without prior written
 *    permission of the Apache Software Foundation.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * <http://www.apache.org/>.
 */

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

/**
 * <p>A base class for converters that transform a normal configuration
 * object into a hierarchical configuration.</p>
 * <p>This class provides a default mechanism for iterating over the keys in a
 * configuration and to throw corresponding element start and end events. By
 * handling these events a hierarchy can be constructed that is equivalent to
 * the keys in the original configuration.</p>
 * <p>Concrete sub classes will implement event handlers that generate SAX
 * events for XML processing or construct a
 * <code>HierarchicalConfiguration</code> root node. All in all with this class
 * it is possible to treat a default configuration as if it was a hierarchical
 * configuration, which can be sometimes useful.</p>
 * @see HierarchicalConfiguration
 *
 * @author <a href="mailto:oliver.heger@t-online.de">Oliver Heger</a>
 * @version $Id: HierarchicalConfigurationConverter.java,v 1.1 2003/12/09 08:25:30 huumai Exp $
 */
abstract class HierarchicalConfigurationConverter
{
    /**
     * Processes the specified configuration object. This method implements
     * the iteration over the configuration's keys. All defined keys are
     * translated into a set of element start and end events represented by
     * calls to the <code>elementStart()</code> and
     * <code>elementEnd()</code> methods.
     * @param config the configuration to be processed
     */
    public void process(Configuration config)
    {
        if (config != null)
        {
            ConfigurationKey keyEmpty = new ConfigurationKey();
            ConfigurationKey keyLast = keyEmpty;

            for (Iterator it = config.getKeys(); it.hasNext();)
            {
                String key = (String) it.next();
                ConfigurationKey keyAct = new ConfigurationKey(key);
                closeElements(keyLast, keyAct);
                String elem = openElements(keyLast, keyAct);
                fireValue(elem, config.getProperty(key));
                keyLast = keyAct;
            } /* for */

            closeElements(keyLast, keyEmpty); // close all open
        }
    }

    /**
     * An event handler method that is called when an element starts.
     * Concrete sub classes must implement it to perform a proper event
     * handling.
     * @param name the name of the new element
     * @param value the element's value; can be <b>null</b> if the element
     * does not have any value
     */
    protected abstract void elementStart(String name, Object value);

    /**
     * An event handler method that is called when an element ends. For each
     * call of <code>elementStart()</code> there will be a corresponding call
     * of this method. Concrete sub classes must implement it to perform a
     * proper event handling.
     * @param name the name of the ending element
     */
    protected abstract void elementEnd(String name);

    /**
     * Fires all necessary element end events for the specified keys. This
     * method is called for each key obtained from the configuration to be
     * converted. It calculates the common part of the actual and the last
     * processed key and thus determines how many elements must be
     * closed.
     * @param keyLast the last processed key
     * @param keyAct the actual key
     */
    protected void closeElements(
        ConfigurationKey keyLast,
        ConfigurationKey keyAct)
    {
        ConfigurationKey keyDiff = keyAct.differenceKey(keyLast);
        Iterator it = reverseIterator(keyDiff);
        if (it.hasNext())
        {
            // Skip first because it has already been closed by fireValue()
            it.next();
        } /* if */

        while (it.hasNext())
        {
            elementEnd((String) it.next());
        } /* while */
    }

    /**
     * Helper method for determining a reverse iterator for the specified key.
     * This implementation returns an iterator that returns the parts of the
     * given key in reverse order, ignoring indices.
     * @param key the key
     * @return a reverse iterator for the parts of this key
     */
    protected Iterator reverseIterator(ConfigurationKey key)
    {
        List list = new ArrayList();
        for (ConfigurationKey.KeyIterator it = key.iterator(); it.hasNext();)
        {
            list.add(it.nextKey());
        } /* for */

        Collections.reverse(list);
        return list.iterator();
    }

    /**
     * Fires all necessary element start events for the specified key. This
     * method is called for each key obtained from the configuration to be
     * converted. It ensures that all elements "between" the last key and the
     * actual key are opened.
     * @param keyLast the last processed key
     * @param keyAct the actual key
     * @return the name of the last element on the path
     */
    protected String openElements(
        ConfigurationKey keyLast,
        ConfigurationKey keyAct)
    {
        ConfigurationKey.KeyIterator it =
            keyLast.differenceKey(keyAct).iterator();

        for (it.nextKey(); it.hasNext(); it.nextKey())
        {
            elementStart(it.currentKey(), null);
        } /* for */

        return it.currentKey();
    }

    /**
     * Fires all necessary element start events with the actual element values.
     * This method is called for each key obtained from the configuration to be
     * processed with the last part of the key as argument. The value can be
     * either a single value or a collection.
     * @param name the name of the actual element
     * @param value the element's value
     */
    protected void fireValue(String name, Object value)
    {
        if (value != null && value instanceof Collection)
        {
            for (Iterator it = ((Collection) value).iterator(); it.hasNext();)
            {
                fireValue(name, it.next());
            } /* for */
        } /* if */

        else
        {
            elementStart(name, value);
            elementEnd(name);
        } /* else */
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区中文视频| 亚洲精品国产一区二区三区四区在线| 成人欧美一区二区三区1314| 国产精品66部| 国产精品每日更新在线播放网址 | 狠狠色丁香婷综合久久| 91精品国产免费久久综合| 日本午夜一区二区| 日韩欧美黄色影院| 蜜桃视频在线观看一区二区| 久久综合九色综合97婷婷女人| 国产精品一二三在| 亚洲精品欧美激情| 欧美一区二区三区视频在线 | 九九视频精品免费| www国产亚洲精品久久麻豆| 国产成人精品三级| 亚洲欧洲韩国日本视频| 欧美精品一卡二卡| 国产精品99久久久久久宅男| 亚洲欧洲日韩综合一区二区| 精品婷婷伊人一区三区三| 免费高清不卡av| 国产精品视频观看| 欧美精品一级二级三级| 国产精品综合在线视频| 国产成人在线看| 一区二区免费在线| 精品精品欲导航| www.日韩大片| 天天综合网 天天综合色| www国产亚洲精品久久麻豆| 成人的网站免费观看| 午夜欧美2019年伦理| 久久免费午夜影院| 91精品福利视频| 精品一区二区三区免费毛片爱 | 欧美日韩色综合| 8v天堂国产在线一区二区| 成人av综合一区| 日韩精品亚洲一区二区三区免费| 国产欧美一区二区在线| 欧美视频一区在线| 成人精品视频一区二区三区| 蜜臀久久99精品久久久久久9| 国产精品夫妻自拍| 26uuu精品一区二区在线观看| 91高清在线观看| 韩国精品一区二区| 亚洲成人三级小说| √…a在线天堂一区| 欧美夫妻性生活| 色综合色综合色综合| 国产一区二区三区免费在线观看| 亚洲一线二线三线久久久| 久久久久国产免费免费| 欧美色手机在线观看| 国产精一品亚洲二区在线视频| 日韩av电影免费观看高清完整版在线观看| 国产精品成人一区二区艾草| 日韩精品在线一区| 欧美剧在线免费观看网站| 一本一道久久a久久精品综合蜜臀| 国产超碰在线一区| 国产精品一区二区三区网站| 日韩欧美不卡在线观看视频| 亚洲成年人影院| 综合在线观看色| 国产精品毛片久久久久久| 久久久蜜桃精品| 欧美精品一区视频| 精品动漫一区二区三区在线观看| 欧美日本在线观看| 欧美日韩亚洲不卡| 欧美剧在线免费观看网站| 欧美日本视频在线| 欧美系列在线观看| 欧美性色黄大片手机版| 欧美亚洲综合久久| 欧美三级中文字幕| 精品污污网站免费看| 欧美日韩国产高清一区| 欧美情侣在线播放| 日韩欧美色电影| 亚洲精品一区二区三区精华液 | 盗摄精品av一区二区三区| 高清av一区二区| 成人精品电影在线观看| www.久久久久久久久| 色综合久久久网| 91精品办公室少妇高潮对白| 欧美日韩国产欧美日美国产精品| 91精品久久久久久久久99蜜臂| 91精品久久久久久久99蜜桃| 精品久久人人做人人爱| 国产亚洲一本大道中文在线| 欧美国产丝袜视频| 亚洲欧洲国产日韩| 亚洲电影一级黄| 久久国产精品72免费观看| 国产原创一区二区三区| 不卡区在线中文字幕| 在线精品观看国产| 91精品国产色综合久久不卡电影| 欧美视频一区二区三区在线观看| 国产成人精品免费在线| 日本久久一区二区| 欧美一卡二卡在线观看| 久久免费看少妇高潮| 色香色香欲天天天影视综合网| 亚洲一区二区不卡免费| 首页国产丝袜综合| 国产精品18久久久久久vr| 成人av网站在线观看| 欧美日韩三级在线| 久久久九九九九| 一区二区三区精品在线观看| 麻豆国产精品777777在线| 成人精品国产一区二区4080| 欧美日本韩国一区二区三区视频| 精品成人一区二区三区| 亚洲欧美激情视频在线观看一区二区三区| 丝袜诱惑制服诱惑色一区在线观看 | 裸体健美xxxx欧美裸体表演| 高清不卡一二三区| 欧美人xxxx| 日韩一区日韩二区| 久久国产尿小便嘘嘘| 在线观看免费亚洲| 久久久久一区二区三区四区| 亚洲一区二区三区中文字幕| 国产高清不卡一区二区| 欧美精品18+| 亚洲男人电影天堂| 国产精品12区| 日韩精品一区二区三区蜜臀| 亚洲精品va在线观看| 国产精品一级在线| 欧美成人性战久久| 亚洲国产中文字幕| 91色视频在线| 国产精品免费网站在线观看| 欧美视频在线观看一区| 亚洲视频在线一区| 国产麻豆91精品| 91精品国产综合久久久久久久久久 | 日本成人在线视频网站| 色综合中文字幕国产 | 国产欧美精品一区二区三区四区| 亚洲国产成人av| 一本大道综合伊人精品热热 | 99国产精品99久久久久久| 国产性天天综合网| 狠狠色综合日日| 91精品国产一区二区三区蜜臀| 一区二区三区**美女毛片| 不卡的电影网站| 中文字幕欧美激情| 成人性视频免费网站| 久久久www成人免费无遮挡大片| 午夜影视日本亚洲欧洲精品| 欧美影院一区二区| 最新国产の精品合集bt伙计| 成人av在线电影| 中文字幕一区二区三区不卡 | 成人精品一区二区三区中文字幕| 国产成人午夜精品影院观看视频| 日日欢夜夜爽一区| 麻豆成人久久精品二区三区小说| 亚洲高清久久久| 国产一区激情在线| 日韩av电影天堂| 久久精品综合网| 精品日韩在线观看| 精品蜜桃在线看| 欧美一区二区三区的| 日本道免费精品一区二区三区| 日韩不卡免费视频| 风流少妇一区二区| 91国偷自产一区二区三区观看 | 中文字幕在线不卡一区| 欧美日韩精品是欧美日韩精品| 亚洲精品久久久蜜桃| 亚洲精品视频免费观看| 亚洲成人动漫精品| 免费观看久久久4p| 欧美视频在线一区二区三区| 国产精品理论片在线观看| 亚洲精品成人少妇| 亚洲免费在线看| 亚洲一区二区三区四区的| 国产区在线观看成人精品| 久久精品国产**网站演员| 人人精品人人爱| 99这里只有久久精品视频| 欧美日韩一级视频| 日韩一区二区麻豆国产| 精品免费视频一区二区| 国产一区在线看| 欧美一区二区三区在线|