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

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

?? messageresources.java

?? struts的源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * $Id: MessageResources.java 264684 2005-08-30 03:08:01Z niallp $ 
 *
 * Copyright 1999-2005 The Apache Software Foundation.
 * 
 * Licensed 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.struts.util;

import java.io.Serializable;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Locale;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * General purpose abstract class that describes an API for retrieving
 * Locale-sensitive messages from underlying resource locations of an
 * unspecified design, and optionally utilizing the <code>MessageFormat</code>
 * class to produce internationalized messages with parametric replacement.
 * <p>
 * Calls to <code>getMessage()</code> variants without a <code>Locale</code>
 * argument are presumed to be requesting a message string in the default
 * <code>Locale</code> for this JVM.
 * <p>
 * Calls to <code>getMessage()</code> with an unknown key, or an unknown
 * <code>Locale</code> will return <code>null</code> if the
 * <code>returnNull</code> property is set to <code>true</code>.  Otherwise,
 * a suitable error message will be returned instead.
 * <p>
 * <strong>IMPLEMENTATION NOTE</strong> - Classes that extend this class
 * must be Serializable so that instances may be used in distributable
 * application server environments.
 *
 * @version $Rev: 264684 $ $Date: 2005-08-30 04:08:01 +0100 (Tue, 30 Aug 2005) $
 */
public abstract class MessageResources implements Serializable {

    // ------------------------------------------------------------- Properties

    /**
     * Commons Logging instance.
     */
    protected static Log log = LogFactory.getLog(MessageResources.class);

    /**
     * The configuration parameter used to initialize this MessageResources.
     */
    protected String config = null;

    /**
     * The configuration parameter used to initialize this MessageResources.
     * @return parameter used to initialize this MessageResources
     */
    public String getConfig() {
        return (this.config);
    }

    /**
     * The default Locale for our environment.
     */
    protected Locale defaultLocale = Locale.getDefault();

    /**
     * The <code>MessageResourcesFactory</code> that created this instance.
     */
    protected MessageResourcesFactory factory = null;

    /**
     * The <code>MessageResourcesFactory</code> that created this instance.
     * @return <code>MessageResourcesFactory</code> that created instance
     */
    public MessageResourcesFactory getFactory() {
        return (this.factory);
    }

    /**
     * The set of previously created MessageFormat objects, keyed by the
     * key computed in <code>messageKey()</code>.
     */
    protected HashMap formats = new HashMap();

    /**
     * Indicate is a <code>null</code> is returned instead of an error message string
     * when an unknown Locale or key is requested.
     */
    protected boolean returnNull = false;

    /**
     * Indicates that a <code>null</code> is returned instead of an error message string
     * if an unknown Locale or key is requested.
     * @return true if null is returned if unknown key or locale is requested
     */
    public boolean getReturnNull() {
        return (this.returnNull);
    }

    /**
     * Indicates that a <code>null</code> is returned instead of an error message string
     * if an unknown Locale or key is requested.
     * @param returnNull true Indicates that a <code>null</code> is returned
     * if an unknown Locale or key is requested.
     */
    public void setReturnNull(boolean returnNull) {
        this.returnNull = returnNull;
    }

    /**
     * Indicates whether 'escape processing' should be performed on
     * the error message string.
     */
    private boolean escape = true;

    /**
     * Indicates whether 'escape processing' should be performed on
     * the error message string.
     *
     * @since Struts 1.2.8
     */
    public boolean isEscape() {
        return escape;
    }

    /**
     * Set whether 'escape processing' should be performed on
     * the error message string.
     *
     * @since Struts 1.2.8
     */
    public void setEscape(boolean escape) {
        this.escape = escape;
    }

    // ----------------------------------------------------------- Constructors

    /**
     * Construct a new MessageResources according to the specified parameters.
     *
     * @param factory The MessageResourcesFactory that created us
     * @param config The configuration parameter for this MessageResources
     */
    public MessageResources(MessageResourcesFactory factory, String config) {

        this(factory, config, false);

    }

    /**
     * Construct a new MessageResources according to the specified parameters.
     *
     * @param factory The MessageResourcesFactory that created us
     * @param config The configuration parameter for this MessageResources
     * @param returnNull The returnNull property we should initialize with
     */
    public MessageResources(
        MessageResourcesFactory factory,
        String config,
        boolean returnNull) {

        super();
        this.factory = factory;
        this.config = config;
        this.returnNull = returnNull;

    }

    // --------------------------------------------------------- Public Methods

    /**
     * Returns a text message for the specified key, for the default Locale.
     *
     * @param key The message key to look up
     */
    public String getMessage(String key) {

        return this.getMessage((Locale) null, key, null);

    }

    /**
     * Returns a text message after parametric replacement of the specified
     * parameter placeholders.
     *
     * @param key The message key to look up
     * @param args An array of replacement parameters for placeholders
     */
    public String getMessage(String key, Object args[]) {

        return this.getMessage((Locale) null, key, args);

    }

    /**
     * Returns a text message after parametric replacement of the specified
     * parameter placeholders.
     *
     * @param key The message key to look up
     * @param arg0 The replacement for placeholder {0} in the message
     */
    public String getMessage(String key, Object arg0) {

        return this.getMessage((Locale) null, key, arg0);

    }

    /**
     * Returns a text message after parametric replacement of the specified
     * parameter placeholders.
     *
     * @param key The message key to look up
     * @param arg0 The replacement for placeholder {0} in the message
     * @param arg1 The replacement for placeholder {1} in the message
     */
    public String getMessage(String key, Object arg0, Object arg1) {

        return this.getMessage((Locale) null, key, arg0, arg1);

    }

    /**
     * Returns a text message after parametric replacement of the specified
     * parameter placeholders.
     *
     * @param key The message key to look up
     * @param arg0 The replacement for placeholder {0} in the message
     * @param arg1 The replacement for placeholder {1} in the message
     * @param arg2 The replacement for placeholder {2} in the message
     */
    public String getMessage(String key, Object arg0, Object arg1, Object arg2) {

        return this.getMessage((Locale) null, key, arg0, arg1, arg2);

    }

    /**
     * Returns a text message after parametric replacement of the specified
     * parameter placeholders.
     *
     * @param key The message key to look up
     * @param arg0 The replacement for placeholder {0} in the message
     * @param arg1 The replacement for placeholder {1} in the message
     * @param arg2 The replacement for placeholder {2} in the message
     * @param arg3 The replacement for placeholder {3} in the message
     */
    public String getMessage(
        String key,
        Object arg0,
        Object arg1,
        Object arg2,
        Object arg3) {

        return this.getMessage((Locale) null, key, arg0, arg1, arg2, arg3);

    }

    /**
     * Returns a text message for the specified key, for the default Locale.
     * A null string result will be returned by this method if no relevant
     * message resource is found for this key or Locale, if the
     * <code>returnNull</code> property is set.  Otherwise, an appropriate
     * error message will be returned.
     * <p>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产嫩草影院久久久久| 亚洲大片免费看| 国产精品乱码久久久久久| 久久婷婷综合激情| 国产精品传媒在线| 国产精品第五页| 午夜精品一区二区三区免费视频 | 久久福利视频一区二区| 蜜臀99久久精品久久久久久软件 | 精品国精品国产| 亚洲乱码日产精品bd| 午夜精品一区二区三区电影天堂 | 91精品国产91久久久久久最新毛片| 一区二区三区不卡视频| 午夜国产不卡在线观看视频| 国产一区二区免费视频| 在线观看区一区二| 中文字幕一区三区| 亚洲国产精品欧美一二99| 日本一区二区成人| 久久成人免费网站| 欧美精品久久99| 亚洲黄网站在线观看| 国产精品原创巨作av| 911国产精品| 蜜臀精品一区二区三区在线观看| caoporen国产精品视频| 久久五月婷婷丁香社区| 色8久久人人97超碰香蕉987| 国产亚洲1区2区3区| 精品午夜久久福利影院| 欧美性生活大片视频| 三级成人在线视频| 国产精品三级在线观看| 国产一区二三区好的| 奇米精品一区二区三区在线观看一| 国产自产高清不卡| 亚洲乱码国产乱码精品精小说| 日韩美女视频在线| 欧美探花视频资源| 色狠狠色狠狠综合| 菠萝蜜视频在线观看一区| 精品一区二区三区香蕉蜜桃| 一区二区三区在线观看视频 | 日韩av不卡一区二区| 一区二区三区四区在线免费观看| 欧美一级欧美一级在线播放| 欧美午夜电影网| 色噜噜夜夜夜综合网| 波波电影院一区二区三区| 高清国产一区二区三区| 一区二区三区精品视频在线| 不卡高清视频专区| 国产老肥熟一区二区三区| 国产一区二区久久| 国产精品2024| 91同城在线观看| 欧美在线观看视频在线| 欧美日韩国产美女| 日韩一级在线观看| 日韩三级视频在线观看| 久久综合色播五月| 中文字幕av一区二区三区高 | 日韩精品一二三区| 亚洲成va人在线观看| 精品亚洲国内自在自线福利| 欧美亚洲综合一区| 91官网在线免费观看| 欧美伊人久久大香线蕉综合69 | 成人在线视频一区| 国产精品久久久久久亚洲毛片 | 91国产福利在线| 成人精品在线视频观看| av在线播放一区二区三区| 欧美日韩一区二区三区四区五区 | 国产午夜精品久久久久久久| 久久女同精品一区二区| 中文字幕不卡在线观看| 国产精品嫩草久久久久| 国产精品免费久久久久| 亚洲一区二区综合| 日韩精彩视频在线观看| 国内精品久久久久影院色| 成人av在线网| 欧美另类z0zxhd电影| 亚洲国产精品av| 视频在线观看国产精品| 麻豆成人91精品二区三区| 丰满亚洲少妇av| 欧美男男青年gay1069videost| 欧美一区二区三区在线观看| 欧美国产日韩精品免费观看| 日韩高清不卡一区二区三区| 91啪在线观看| 蜜臀久久99精品久久久画质超高清| 欧美大尺度电影在线| av电影在线观看完整版一区二区| 一区二区三区欧美日韩| 欧美日本一区二区| 亚洲二区视频在线| 欧美年轻男男videosbes| 五月综合激情婷婷六月色窝| 色综合久久久久综合99| 亚洲制服欧美中文字幕中文字幕| 日本久久一区二区三区| 一区二区三区四区不卡在线| 在线播放中文字幕一区| 日韩精品亚洲一区二区三区免费| 91精品久久久久久久久99蜜臂| 亚洲成av人在线观看| 欧美一区二区三区的| 一区二区三区四区亚洲| 精品欧美久久久| 色综合久久久久综合| 一本色道久久综合亚洲aⅴ蜜桃 | 欧美精品 日韩| 国内精品不卡在线| 亚洲h精品动漫在线观看| 国产色婷婷亚洲99精品小说| 欧美日本一区二区三区四区| 成人av在线网| 国产丶欧美丶日本不卡视频| 日本亚洲视频在线| 日韩欧美国产一二三区| 国产酒店精品激情| eeuss影院一区二区三区| 亚洲成年人网站在线观看| 亚洲国产精品久久人人爱蜜臀 | 国产乱人伦精品一区二区在线观看 | 日韩一级片网站| 久久精品一区四区| 欧美日韩aaaaa| 91免费看片在线观看| 成人做爰69片免费看网站| 日韩av网站在线观看| 一区二区在线观看视频| 日本一区二区三区电影| 精品成人一区二区三区四区| 日韩一区二区三区免费看| 色婷婷一区二区| hitomi一区二区三区精品| 懂色av一区二区夜夜嗨| 久久精品国产网站| 另类中文字幕网| 美女高潮久久久| 久久精品av麻豆的观看方式| 日韩主播视频在线| 亚洲午夜av在线| 777奇米成人网| 精品久久久久99| 欧美日韩在线播放三区四区| 亚洲国产精品一区二区久久| 成人免费在线视频观看| 中文乱码免费一区二区| 国产欧美一区二区三区鸳鸯浴| 久久久久亚洲蜜桃| 久久蜜桃av一区精品变态类天堂| 欧美成人激情免费网| 日韩免费观看2025年上映的电影| 在线播放/欧美激情| 91精品国产91热久久久做人人| 欧美美女激情18p| 欧美日本韩国一区二区三区视频| 欧美一区二区在线不卡| 91精品免费观看| 国产婷婷一区二区| 亚洲视频在线一区| 亚洲国产视频直播| 精品夜夜嗨av一区二区三区| 国产精品原创巨作av| 福利电影一区二区| 91网站在线播放| 欧美三级午夜理伦三级中视频| 欧美人与禽zozo性伦| 精品免费视频一区二区| 国产成人精品1024| 91免费看片在线观看| 欧美午夜免费电影| 欧美变态口味重另类| 中文字幕日本乱码精品影院| 亚洲一级片在线观看| 日本一区中文字幕| 麻豆成人久久精品二区三区小说| 91精品国产手机| 久久久精品综合| 亚洲欧美一区二区三区久本道91| 亚洲综合视频网| 精品一区二区久久| 欧美亚洲图片小说| 久久久99精品免费观看| 亚洲一区二区三区在线看| 精品系列免费在线观看| 欧美主播一区二区三区美女| 久久免费美女视频| 亚洲成人中文在线| 国产成人精品亚洲日本在线桃色| 日本精品免费观看高清观看| 精品日韩欧美一区二区| 亚洲人成影院在线观看| 国模套图日韩精品一区二区|