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

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

?? resourcebundleelresolver.java

?? java屬性邦定的(JSR-295)的一個實現
?? JAVA
字號:
/*
 * Copyright (C) 2007 Sun Microsystems, Inc. All rights reserved. Use is
 * subject to license terms.
 */

package org.jdesktop.el;

import java.beans.FeatureDescriptor;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
 * Defines property resolution behavior on instances of
 * {@link java.util.ResourceBundle}.
 * 
 * <p>
 * This resolver handles base objects of type
 * <code>java.util.ResourceBundle</code>. It accepts any object as a property
 * and coerces it to a <code>java.lang.String</code> for invoking
 * {@link java.util.ResourceBundle#getObject(java.lang.String)}.
 * </p>
 * 
 * <p>
 * This resolver is read only and will throw a
 * {@link PropertyNotWritableException} if <code>setValue</code> is called.
 * </p>
 * 
 * <p>
 * <code>ELResolver</code>s are combined together using
 * {@link CompositeELResolver}s, to define rich semantics for evaluating an
 * expression. See the javadocs for {@link ELResolver} for details.
 * </p>
 * 
 * @see CompositeELResolver
 * @see ELResolver
 * @see java.util.ResourceBundle
 * @since JSP 2.1
 */
public class ResourceBundleELResolver extends ELResolver {

    /**
     * If the base object is an instance of <code>ResourceBundle</code>,
     * the provided property will first be coerced to a <code>String</code>.
     * The <code>Object</code> returned by <code>getObject</code> on
     * the base <code>ResourceBundle</code> will be returned.
     * </p>
     * If the base is <code>ResourceBundle</code>, the
     * <code>propertyResolved</code> property of the <code>ELContext</code>
     * object must be set to <code>true</code> by this resolver, before
     * returning. If this property is not <code>true</code> after this method
     * is called, the caller should ignore the return value.
     * </p>
     * @param context
     *            The context of this evaluation.
     * @param base
     *            The ResourceBundle to analyze.
     * @param property
     *            The name of the property to analyze. Will be coerced to a
     *            <code>String</code>.
     * @return If the <code>propertyResolved</code> property of
     *         <code>ELContext</code> was set to <code>true</code>, then
     *         <code>null</code> if property is <code>null</code>;
     *         otherwise the <code>Object</code> for the given key
     *         (property coerced to <code>String</code>) from the
     *         <code>ResourceBundle</code>.
     *         If no object for the given key can be found, then the 
     *         <code>String</code> "???" + key + "???".
     * @throws NullPointerException
     *             if context is <code>null</code>
     * @throws ELException
     *             if an exception was thrown while performing the property or
     *             variable resolution. The thrown exception must be included as
     *             the cause property of this exception, if available.
     */
    public Object getValue(ELContext context, Object base, Object property) {
        if (context == null) {
            throw new NullPointerException();
        }

        if (base instanceof ResourceBundle) {
            context.setPropertyResolved(true);
            if (property != null) {
                try {
                    return ((ResourceBundle) base).getObject(property
                            .toString());
                } catch (MissingResourceException e) {
                    return "???" + property + "???";
                }
            }
        }
        return null;
    }

    /**
     * If the base object is an instance of <code>ResourceBundle</code>,
     * return <code>null</code>, since the resolver is read only.
     * 
     * <p>
     * If the base is <code>ResourceBundle</code>, the
     * <code>propertyResolved</code> property of the <code>ELContext</code>
     * object must be set to <code>true</code> by this resolver, before
     * returning. If this property is not <code>true</code> after this method
     * is called, the caller should ignore the return value.
     * </p>
     * 
     * @param context
     *            The context of this evaluation.
     * @param base
     *            The ResourceBundle to analyze.
     * @param property
     *            The name of the property to analyze.
     * @return If the <code>propertyResolved</code> property of
     *         <code>ELContext</code> was set to <code>true</code>, then
     *         <code>null</code>; otherwise undefined.
     * @throws NullPointerException
     *             if context is <code>null</code>
     */
    public Class<?> getType(ELContext context, Object base, Object property) {
        if (context == null) {
            throw new NullPointerException();
        }

        if (base instanceof ResourceBundle) {
            context.setPropertyResolved(true);
        }
        return null;
    }

    /**
     * If the base object is a ResourceBundle, throw a
     * {@link PropertyNotWritableException}.
     * 
     * @param context
     *            The context of this evaluation.
     * @param base
     *            The ResourceBundle to be modified. Only bases that are of type
     *            ResourceBundle are handled.
     * @param property
     *            The String property to use.
     * @param value
     *            The value to be set.
     * @throws NullPointerException
     *             if context is <code>null</code>.
     * @throws PropertyNotWritableException
     *             Always thrown if base is an instance of ReasourceBundle.
     */
    public void setValue(ELContext context, Object base, Object property,
            Object value) {
        if (context == null) {
            throw new NullPointerException();
        }

        if (base instanceof ResourceBundle) {
            context.setPropertyResolved(true);
            throw new PropertyNotWritableException(
                    "ResourceBundles are immutable");
        }
    }

    /**
     * If the base object is not null and an instanceof {@link ResourceBundle},
     * return <code>true</code>.
     * 
     * @param context
     *            The context of this evaluation.
     * @param base
     *            The ResourceBundle to be modified. Only bases that are of type
     *            ResourceBundle are handled.
     * @param property
     *            The String property to use.
     * @return If the <code>propertyResolved</code> property of
     *         <code>ELContext</code> was set to <code>true</code>, then
     *         <code>true</code>; otherwise undefined.
     * @throws NullPointerException
     *             if context is <code>null</code>
     */
    public boolean isReadOnly(ELContext context, Object base, Object property) {
        if (context == null) {
            throw new NullPointerException();
        }
        if (base instanceof ResourceBundle) {
            context.setPropertyResolved(true);
            return true;
        }
        return false;
    }

    /**
     * If the base object is a ResourceBundle, returns an <code>Iterator</code>
     * containing the set of keys available in the <code>ResourceBundle</code>.
     * Otherwise, returns <code>null</code>.
     * 
     * <p>
     * The <code>Iterator</code> returned must contain zero or more instances
     * of {@link java.beans.FeatureDescriptor}. Each info object contains
     * information about a key in the ResourceBundle, and is initialized as
     * follows:
     * <dl>
     * <li>displayName - The <code>String</code> key
     * <li>name - Same as displayName property.</li>
     * <li>shortDescription - Empty string</li>
     * <li>expert - <code>false</code></li>
     * <li>hidden - <code>false</code></li>
     * <li>preferred - <code>true</code></li>
     * </dl>
     * In addition, the following named attributes must be set in the returned
     * <code>FeatureDescriptor</code>s:
     * <dl>
     * <li>{@link ELResolver#TYPE} - <code>String.class</code></li>
     * <li>{@link ELResolver#RESOLVABLE_AT_DESIGN_TIME} - <code>true</code></li>
     * </dl>
     * </p>
     * 
     * @param context
     *            The context of this evaluation.
     * @param base
     *            The bundle whose keys are to be iterated over. Only bases of
     *            type <code>ResourceBundle</code> are handled by this
     *            resolver.
     * @return An <code>Iterator</code> containing zero or more (possibly
     *         infinitely more) <code>FeatureDescriptor</code> objects, each
     *         representing a key in this bundle, or <code>null</code> if the
     *         base object is not a ResourceBundle.
     */
    public Iterator getFeatureDescriptors(ELContext context, Object base) {
        if (base instanceof ResourceBundle) {
            ResourceBundle bundle = (ResourceBundle) base;
            List features = new ArrayList();
            String key = null;
            FeatureDescriptor desc = null;
            for (Enumeration e = bundle.getKeys(); e.hasMoreElements();) {
                key = (String) e.nextElement();
                desc = new FeatureDescriptor();
                desc.setDisplayName(key);
                desc.setExpert(false);
                desc.setHidden(false);
                desc.setName(key);
                desc.setPreferred(true);
                desc.setValue(TYPE, String.class);
                desc.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
                features.add(desc);
            }
            return features.iterator();
        }
        return null;
    }

    /**
     * If the base object is a ResourceBundle, returns the most general type
     * that this resolver accepts for the <code>property</code> argument.
     * Otherwise, returns <code>null</code>.
     * 
     * <p>
     * Assuming the base is a <code>ResourceBundle</code>, this method will
     * always return <code>String.class</code>.
     * 
     * @param context
     *            The context of this evaluation.
     * @param base
     *            The bundle to analyze. Only bases of type
     *            <code>ResourceBundle</code> are handled by this resolver.
     * @return <code>null</code> if base is not a <code>ResourceBundle</code>;
     *         otherwise <code>String.class</code>.
     */
    public Class<?> getCommonPropertyType(ELContext context, Object base) {
        if (base instanceof ResourceBundle) {
            return String.class;
        }
        return null;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色域天天综合网| 国产亚洲欧美一级| 一区二区三区四区不卡视频 | 成+人+亚洲+综合天堂| 欧美视频日韩视频在线观看| 精品久久久久久久久久久久久久久| 国产精品丝袜在线| 老司机一区二区| 欧美日韩小视频| 亚洲欧美日韩小说| 国产99久久久国产精品潘金 | 亚洲色图制服丝袜| 国产在线乱码一区二区三区| 欧美日韩国产系列| 亚洲日本中文字幕区| 国产精品一区二区男女羞羞无遮挡 | 国产精品久久久久一区二区三区共 | 欧美二区乱c少妇| 亚洲人成人一区二区在线观看| 日本欧美一区二区在线观看| 91影院在线免费观看| 久久久久久一二三区| 日韩vs国产vs欧美| 欧美在线高清视频| 一区二区三区欧美日| 成人av免费观看| 国产夜色精品一区二区av| 精品中文av资源站在线观看| 91精品久久久久久久91蜜桃| 亚洲一区二区av电影| 欧洲av在线精品| 亚洲国产中文字幕在线视频综合 | 亚洲同性gay激情无套| 成人免费毛片a| 中文字幕亚洲在| 99久久久国产精品免费蜜臀| 欧美激情一区二区三区不卡| 大白屁股一区二区视频| 欧美国产日韩在线观看| 99国产欧美久久久精品| 亚洲免费av高清| 欧美日韩三级一区二区| 日韩黄色免费网站| 欧美成人猛片aaaaaaa| 国产呦萝稀缺另类资源| 中文无字幕一区二区三区| 成人理论电影网| 一区二区三区欧美亚洲| 在线综合视频播放| 精品一区二区三区免费| 国产人妖乱国产精品人妖| 99亚偷拍自图区亚洲| 亚洲电影视频在线| 欧美哺乳videos| eeuss鲁一区二区三区| 亚洲男同性视频| 91精选在线观看| 精品亚洲免费视频| 国产精品嫩草99a| 欧美色涩在线第一页| 精品在线一区二区| 亚洲男人都懂的| 日韩欧美一级在线播放| 高清av一区二区| 亚洲gay无套男同| 精品国产污污免费网站入口| 久久久久久久久免费| av中文字幕不卡| 亚洲午夜免费视频| 日韩免费观看高清完整版在线观看| 国产剧情一区二区| 亚洲免费观看视频| 精品美女被调教视频大全网站| 成人永久免费视频| 日本va欧美va瓶| 国产精品久久久久aaaa| 欧美精品一级二级三级| 丁香婷婷深情五月亚洲| 天天综合网 天天综合色| 中文字幕免费不卡在线| 69精品人人人人| 94色蜜桃网一区二区三区| 久久国产成人午夜av影院| 亚洲欧美国产高清| 国产欧美1区2区3区| 欧美日韩一区三区| www.亚洲人| 国内久久婷婷综合| 日韩电影免费在线观看网站| 自拍偷自拍亚洲精品播放| 久久综合色播五月| 4438成人网| 欧美视频一区二区| 91网址在线看| 国产·精品毛片| 韩国一区二区在线观看| 天天免费综合色| 一区二区三区日韩欧美精品| 中文字幕的久久| 久久久99精品久久| 久久综合色播五月| 亚洲精品一区在线观看| 91麻豆精品国产91久久久资源速度| 91色综合久久久久婷婷| caoporn国产精品| 国产精品夜夜嗨| 国产精品一区一区三区| 国产一区二区视频在线| 日韩电影在线免费看| 丝瓜av网站精品一区二区| 亚洲一区二区三区四区在线| 亚洲综合男人的天堂| 亚洲色图在线播放| 亚洲视频免费在线观看| 亚洲素人一区二区| 最新国产精品久久精品| 中文字幕在线不卡视频| 亚洲区小说区图片区qvod| 亚洲免费观看高清| 亚洲国产视频网站| 香蕉加勒比综合久久| 免费观看30秒视频久久| 久久99国内精品| 国产白丝精品91爽爽久久| 成人性生交大片免费看中文| 成人深夜福利app| 色综合天天视频在线观看| 在线观看成人小视频| 欧美另类变人与禽xxxxx| 欧美二区乱c少妇| 久久久亚洲精品一区二区三区| 久久久无码精品亚洲日韩按摩| 久久精品综合网| 一区二区在线免费| 亚洲成人在线网站| 激情图区综合网| 波多野结衣中文字幕一区二区三区| av亚洲精华国产精华| 91成人免费网站| 91精品国产91久久综合桃花| 精品久久99ma| 中文幕一区二区三区久久蜜桃| 伊人一区二区三区| 麻豆精品在线播放| 成人精品电影在线观看| 欧美午夜宅男影院| 欧美成人一区二区三区| 一区视频在线播放| 亚洲高清免费一级二级三级| 国产一区二区免费视频| 91亚洲精品乱码久久久久久蜜桃| 欧美精品电影在线播放| 欧美国产成人精品| 日韩电影网1区2区| jlzzjlzz亚洲女人18| 日韩一级成人av| 亚洲女性喷水在线观看一区| 激情综合色播五月| 在线日韩一区二区| 久久蜜桃一区二区| 五月综合激情日本mⅴ| 国产成人午夜99999| 在线观看成人免费视频| 国产午夜一区二区三区| 日韩—二三区免费观看av| 成人综合在线观看| 日韩欧美一级在线播放| 亚洲一区二区三区中文字幕在线| 国产a级毛片一区| 欧美成人福利视频| 亚洲一二三区视频在线观看| 成人成人成人在线视频| 精品国产免费久久| 日韩—二三区免费观看av| 一本久道久久综合中文字幕| 日本一区二区三区国色天香| 奇米色一区二区| 欧美乱熟臀69xxxxxx| 亚洲丝袜自拍清纯另类| 国产福利一区在线| 精品久久久网站| 美女网站色91| 日韩视频免费观看高清完整版在线观看 | 午夜欧美视频在线观看| 成人午夜私人影院| 久久久久久久久蜜桃| 精品在线观看免费| 69av一区二区三区| 樱桃国产成人精品视频| 成人福利电影精品一区二区在线观看| 欧美大白屁股肥臀xxxxxx| 日韩福利视频网| 91麻豆精品国产自产在线观看一区 | 色婷婷综合久久久久中文| 欧美激情一区二区三区| 风间由美一区二区三区在线观看 | 国产麻豆精品久久一二三| 日韩精品一区二区三区视频在线观看 | 亚洲福利视频一区二区| 91免费版在线|