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

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

?? localebeanutilsbean.java

?? 這是一個有關common beanutils 的源碼
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/*
 * 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.locale;


import org.apache.commons.beanutils.BeanUtilsBean;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.beanutils.ConvertUtilsBean;
import org.apache.commons.beanutils.DynaBean;
import org.apache.commons.beanutils.DynaClass;
import org.apache.commons.beanutils.DynaProperty;
import org.apache.commons.beanutils.MappedPropertyDescriptor;
import org.apache.commons.beanutils.PropertyUtilsBean;
import org.apache.commons.beanutils.ContextClassLoaderLocal;
import org.apache.commons.beanutils.expression.Resolver;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.beans.IndexedPropertyDescriptor;
import java.beans.PropertyDescriptor;
import java.lang.reflect.InvocationTargetException;
import java.util.Locale;


/**
 * <p>Utility methods for populating JavaBeans properties
 * via reflection in a locale-dependent manner.</p>
 *
 * @author Craig R. McClanahan
 * @author Ralph Schaer
 * @author Chris Audley
 * @author Rey Francois
 * @author Gregor Rayman
 * @author Yauheny Mikulski
 * @since 1.7
 */

public class LocaleBeanUtilsBean extends BeanUtilsBean {

    /** 
     * Contains <code>LocaleBeanUtilsBean</code> instances indexed by context classloader.
     */
    private static final ContextClassLoaderLocal 
            LOCALE_BEANS_BY_CLASSLOADER = new ContextClassLoaderLocal() {
                        // Creates the default instance used when the context classloader is unavailable
                        protected Object initialValue() {
                            return new LocaleBeanUtilsBean();
                        }
                    };
     
     /**
      * Gets singleton instance
      *
      * @return the singleton instance
      */
     public static LocaleBeanUtilsBean getLocaleBeanUtilsInstance() {
        return (LocaleBeanUtilsBean)LOCALE_BEANS_BY_CLASSLOADER.get();
     }
 
    /** 
     * Sets the instance which provides the functionality for {@link LocaleBeanUtils}.
     * This is a pseudo-singleton - an single instance is provided per (thread) context classloader.
     * This mechanism provides isolation for web apps deployed in the same container.
     * 
     * @param newInstance a new singleton instance
     */
    public static void setInstance(LocaleBeanUtilsBean newInstance) {
        LOCALE_BEANS_BY_CLASSLOADER.set(newInstance);
    }

    /** All logging goes through this logger */
    private Log log = LogFactory.getLog(LocaleBeanUtilsBean.class);

    // ----------------------------------------------------- Instance Variables
        
    /** Convertor used by this class */
    private LocaleConvertUtilsBean localeConvertUtils;
    
    // --------------------------------------------------------- Constructors
    
    /** Construct instance with standard conversion bean */
    public LocaleBeanUtilsBean() {
        this.localeConvertUtils = new LocaleConvertUtilsBean();
    }
    
    /** 
     * Construct instance that uses given locale conversion
     *
     * @param localeConvertUtils use this <code>localeConvertUtils</code> to perform
     * conversions
     * @param convertUtilsBean use this for standard conversions
     * @param propertyUtilsBean use this for property conversions
     */
    public LocaleBeanUtilsBean(
                            LocaleConvertUtilsBean localeConvertUtils,
                            ConvertUtilsBean convertUtilsBean,
                            PropertyUtilsBean propertyUtilsBean) {
        super(convertUtilsBean, propertyUtilsBean);
        this.localeConvertUtils = localeConvertUtils;
    }
    
    /** 
     * Construct instance that uses given locale conversion
     *
     * @param localeConvertUtils use this <code>localeConvertUtils</code> to perform
     * conversions
     */
    public LocaleBeanUtilsBean(LocaleConvertUtilsBean localeConvertUtils) {
        this.localeConvertUtils = localeConvertUtils;
    }
    
    // --------------------------------------------------------- Public Methods
    
    /**
     * Gets the bean instance used for conversions
     *
     * @return the locale converter bean instance
     */
    public LocaleConvertUtilsBean getLocaleConvertUtils() {
        return localeConvertUtils;
    }
    
    /**
     * Gets the default Locale
     * @return the default locale
     */
    public Locale getDefaultLocale() {

        return getLocaleConvertUtils().getDefaultLocale();
    }


    /**
     * Sets the default Locale.
     *
     * @param locale the default locale
     */
    public void setDefaultLocale(Locale locale) {

        getLocaleConvertUtils().setDefaultLocale(locale);
    }

    /**
     * Is the pattern to be applied localized
     * (Indicate whether the pattern is localized or not)
     *
     * @return <code>true</code> if pattern is localized,
     * otherwise <code>false</code>
     */
    public boolean getApplyLocalized() {

        return getLocaleConvertUtils().getApplyLocalized();
    }

    /**
     * Sets whether the pattern is applied localized
     * (Indicate whether the pattern is localized or not)
     *
     * @param newApplyLocalized <code>true</code> if pattern is localized,
     * otherwise <code>false</code>
     */
    public void setApplyLocalized(boolean newApplyLocalized) {

        getLocaleConvertUtils().setApplyLocalized(newApplyLocalized);
    }


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

    /**
     * Return the value of the specified locale-sensitive indexed property
     * of the specified bean, as a String. The zero-relative index of the
     * required value must be included (in square brackets) as a suffix to
     * the property name, or <code>IllegalArgumentException</code> will be
     * thrown.
     *
     * @param bean Bean whose property is to be extracted
     * @param name <code>propertyname[index]</code> of the property value
     *  to be extracted
     * @param pattern The conversion pattern
     * @return The indexed property's value, converted to a String
     *
     * @exception IllegalAccessException if the caller does not have
     *  access to the property accessor method
     * @exception InvocationTargetException if the property accessor method
     *  throws an exception
     * @exception NoSuchMethodException if an accessor method for this
     *  propety cannot be found
     */
    public String getIndexedProperty(
                                    Object bean, 
                                    String name, 
                                    String pattern)
                                        throws 
                                            IllegalAccessException, 
                                            InvocationTargetException,
                                            NoSuchMethodException {

        Object value = getPropertyUtils().getIndexedProperty(bean, name);
        return getLocaleConvertUtils().convert(value, pattern);
    }

    /**
     * Return the value of the specified locale-sensitive indexed property
     * of the specified bean, as a String using the default conversion pattern of
     * the corresponding {@link LocaleConverter}. The zero-relative index
     * of the required value must be included (in square brackets) as a suffix
     * to the property name, or <code>IllegalArgumentException</code> will be thrown.
     *
     * @param bean Bean whose property is to be extracted
     * @param name <code>propertyname[index]</code> of the property value
     *  to be extracted
     * @return The indexed property's value, converted to a String
     *
     * @exception IllegalAccessException if the caller does not have
     *  access to the property accessor method
     * @exception InvocationTargetException if the property accessor method
     *  throws an exception
     * @exception NoSuchMethodException if an accessor method for this
     *  propety cannot be found
     */
    public String getIndexedProperty(
                                    Object bean, 
                                    String name)
                                        throws 
                                            IllegalAccessException, 
                                            InvocationTargetException,
                                            NoSuchMethodException {

        return getIndexedProperty(bean, name, null);
    }

    /**
     * Return the value of the specified locale-sensetive indexed property
     * of the specified bean, as a String using the specified conversion pattern.
     * The index is specified as a method parameter and
     * must *not* be included in the property name expression
     *
     * @param bean Bean whose property is to be extracted
     * @param name Simple property name of the property value to be extracted
     * @param index Index of the property value to be extracted
     * @param pattern The conversion pattern
     * @return The indexed property's value, converted to a String
     *
     * @exception IllegalAccessException if the caller does not have
     *  access to the property accessor method
     * @exception InvocationTargetException if the property accessor method
     *  throws an exception
     * @exception NoSuchMethodException if an accessor method for this
     *  propety cannot be found
     */
    public String getIndexedProperty(Object bean,
                                            String name, int index, String pattern)
            throws IllegalAccessException, InvocationTargetException,
            NoSuchMethodException {

        Object value = getPropertyUtils().getIndexedProperty(bean, name, index);
        return getLocaleConvertUtils().convert(value, pattern);
    }

    /**
     * Return the value of the specified locale-sensetive indexed property
     * of the specified bean, as a String using the default conversion pattern of
     * the corresponding {@link LocaleConverter}.
     * The index is specified as a method parameter and
     * must *not* be included in the property name expression
     *
     * @param bean Bean whose property is to be extracted
     * @param name Simple property name of the property value to be extracted
     * @param index Index of the property value to be extracted
     * @return The indexed property's value, converted to a String
     *
     * @exception IllegalAccessException if the caller does not have
     *  access to the property accessor method
     * @exception InvocationTargetException if the property accessor method
     *  throws an exception
     * @exception NoSuchMethodException if an accessor method for this
     *  propety cannot be found
     */
    public String getIndexedProperty(Object bean,
                                            String name, int index)
            throws IllegalAccessException, InvocationTargetException,
            NoSuchMethodException {
        return getIndexedProperty(bean, name, index, null);
    }

    /**
     * Return the value of the specified simple locale-sensitive property
     * of the specified bean, converted to a String using the specified
     * conversion pattern.
     *
     * @param bean Bean whose property is to be extracted
     * @param name Name of the property to be extracted
     * @param pattern The conversion pattern
     * @return The property's value, converted to a String
     *
     * @exception IllegalAccessException if the caller does not have
     *  access to the property accessor method
     * @exception InvocationTargetException if the property accessor method
     *  throws an exception
     * @exception NoSuchMethodException if an accessor method for this
     *  propety cannot be found
     */
    public String getSimpleProperty(Object bean, String name, String pattern)
            throws IllegalAccessException, InvocationTargetException,
            NoSuchMethodException {

        Object value = getPropertyUtils().getSimpleProperty(bean, name);
        return getLocaleConvertUtils().convert(value, pattern);
    }

    /**
     * Return the value of the specified simple locale-sensitive property
     * of the specified bean, converted to a String using the default
     * conversion pattern of the corresponding {@link LocaleConverter}.
     *
     * @param bean Bean whose property is to be extracted
     * @param name Name of the property to be extracted
     * @return The property's value, converted to a String
     *
     * @exception IllegalAccessException if the caller does not have
     *  access to the property accessor method
     * @exception InvocationTargetException if the property accessor method
     *  throws an exception
     * @exception NoSuchMethodException if an accessor method for this
     *  propety cannot be found
     */
    public String getSimpleProperty(Object bean, String name)
            throws IllegalAccessException, InvocationTargetException,
            NoSuchMethodException {

        return getSimpleProperty(bean, name, null);
    }

    /**
     * Return the value of the specified mapped locale-sensitive property
     * of the specified bean, as a String using the specified conversion pattern.
     * The key is specified as a method parameter and must *not* be included in
     * the property name expression.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色偷偷成人一区二区三区91| 国产一区二区久久| 色成人在线视频| 日韩精品成人一区二区三区| 久久久亚洲精品石原莉奈| 91免费看`日韩一区二区| 激情综合色综合久久| 久久久久高清精品| 亚洲一区av在线| 国产精品资源网| 国产馆精品极品| 国产精品免费观看视频| 午夜精品一区二区三区免费视频| 亚洲视频香蕉人妖| 久久99精品国产麻豆婷婷 | 美女国产一区二区三区| 99久久免费视频.com| 欧美嫩在线观看| ...av二区三区久久精品| 欧美日韩视频不卡| 色综合久久中文字幕| 国产精品一级在线| 国产综合色视频| 美日韩一区二区三区| 欧美精品自拍偷拍动漫精品| 亚洲日本青草视频在线怡红院| 欧洲av一区二区嗯嗯嗯啊| 蜜桃传媒麻豆第一区在线观看| 26uuu精品一区二区在线观看| 91精品综合久久久久久| 久久精品国产一区二区三区免费看| 在线免费一区三区| 亚洲国产欧美在线| 在线免费不卡视频| 六月婷婷色综合| 亚洲精品一区二区三区四区高清| 亚洲成av人片一区二区| 欧美成人一级视频| 国产69精品久久99不卡| 日本怡春院一区二区| 国产精品进线69影院| 精品成人在线观看| 欧美日韩亚洲另类| 欧美在线免费视屏| 成人自拍视频在线观看| 一区二区三区中文字幕在线观看| 日韩欧美亚洲国产另类| 成人av免费观看| 激情五月激情综合网| 爽好多水快深点欧美视频| 亚洲精品成人精品456| 中文字幕中文字幕一区| 综合久久给合久久狠狠狠97色 | 精品国产三级电影在线观看| 久久精品免费观看| 中文字幕免费不卡| 成人sese在线| 精品在线视频一区| 亚洲欧美二区三区| 最近日韩中文字幕| 午夜亚洲福利老司机| 亚洲一区二区三区四区五区黄| 国产精品网站导航| 一区二区三区**美女毛片| 日韩午夜精品电影| 麻豆视频观看网址久久| 国产精品麻豆99久久久久久| 日韩一区二区三区精品视频| 国产午夜精品在线观看| 精品欧美乱码久久久久久1区2区| 91色|porny| 色综合久久综合网欧美综合网| 一本久久a久久精品亚洲| 欧美自拍偷拍一区| 91精品欧美一区二区三区综合在| 日韩精品一区二区在线观看| 久久久激情视频| 亚洲午夜在线观看视频在线| 男女男精品视频| 成人av电影在线观看| 欧美欧美欧美欧美首页| 亚洲国产精品二十页| 一区二区三区美女视频| 国产一区二区视频在线| 欧美人体做爰大胆视频| 精品成人一区二区| 午夜精品久久久久久久| 国产99久久久国产精品免费看| 欧美私模裸体表演在线观看| 精品入口麻豆88视频| 亚洲一二三区在线观看| 国产99精品在线观看| 精品国内二区三区| 五月天网站亚洲| 99re视频精品| 中文字幕一区二区三区色视频 | 欧美日本视频在线| 亚洲精品欧美激情| 99精品视频在线观看免费| 欧美国产丝袜视频| 日本免费在线视频不卡一不卡二| 99精品视频一区二区三区| 国产亚洲综合性久久久影院| 六月婷婷色综合| 欧美精品一区二区在线播放| 精品影视av免费| 精品国精品国产| 国产高清久久久久| 欧美韩国日本一区| 97久久精品人人做人人爽50路| 国产精品嫩草99a| 91国偷自产一区二区三区观看| 日韩毛片一二三区| 欧美吻胸吃奶大尺度电影| 亚洲gay无套男同| 欧美成人一区二区三区片免费 | 国产精品日韩精品欧美在线| 国产大陆a不卡| 亚洲乱码精品一二三四区日韩在线 | 亚洲国产精品ⅴa在线观看| 国产v综合v亚洲欧| 亚洲国产精品影院| 欧美一区二区不卡视频| 日韩一卡二卡三卡| 美女网站色91| 国产精品毛片大码女人| 欧美日韩视频在线一区二区 | 久久久久久麻豆| 欧美中文字幕一区二区三区| 国产一区二区三区久久久| 国产精品久久久久影院色老大| 欧美精品欧美精品系列| 99这里只有精品| 国产在线精品一区二区夜色 | 国产高清不卡二三区| 亚洲成人高清在线| 亚洲天堂av老司机| 久久亚洲二区三区| 在线电影院国产精品| 色噜噜久久综合| av电影一区二区| 国产91丝袜在线观看| 久久精品国产精品亚洲红杏 | 亚洲啪啪综合av一区二区三区| 欧美精品一区二区三区四区| 欧美日韩一区二区三区免费看 | 丁香桃色午夜亚洲一区二区三区| 一区二区三区不卡视频 | 国产亚洲1区2区3区| 日韩精品一区二区三区在线| 91精品国产色综合久久ai换脸| 一本大道综合伊人精品热热| 91丨国产丨九色丨pron| 北岛玲一区二区三区四区| 国产乱一区二区| 国产精品乡下勾搭老头1| 捆绑变态av一区二区三区| 久久99热狠狠色一区二区| 蜜臀av性久久久久蜜臀aⅴ流畅| 五月综合激情日本mⅴ| 青青草精品视频| 成人精品一区二区三区四区| 成人av影视在线观看| 不卡在线观看av| 91免费版在线| 欧美一区二区三区在线观看| 国产亚洲欧美激情| 国产精品久久久久久久久久久免费看 | 国产在线视频不卡二| 国v精品久久久网| 色哟哟精品一区| 91精品视频网| 国产精品你懂的| 五月天视频一区| 国产成a人亚洲| 欧美天堂一区二区三区| 国产日韩成人精品| 偷拍亚洲欧洲综合| av不卡免费电影| 日韩欧美国产小视频| 一区二区三区日韩精品| 黄色日韩网站视频| 欧美中文字幕一二三区视频| 国产精品色婷婷久久58| 国产精品麻豆久久久| 日韩国产成人精品| 91啪亚洲精品| 欧美国产精品一区二区三区| 国产精品一线二线三线精华| 欧美在线观看视频在线| 亚洲欧美综合色| 成人黄色777网| 中文字幕国产一区二区| 国内欧美视频一区二区| 欧美一区二区精品在线| 香蕉久久夜色精品国产使用方法| 91片在线免费观看| 亚洲免费视频中文字幕| 成人高清视频在线| 国产精品久久久久久久岛一牛影视 |