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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mappedpropertydescriptor.java

?? 這是一個(gè)有關(guān)common beanutils 的源碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號(hào):
/*
 * 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;


import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.lang.ref.WeakReference;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;


/**
 * A MappedPropertyDescriptor describes one mapped property.
 * Mapped properties are multivalued properties like indexed properties
 * but that are accessed with a String key instead of an index.
 * Such property values are typically stored in a Map collection.
 * For this class to work properly, a mapped value must have
 * getter and setter methods of the form
 * <p><code>get<strong>Property</strong>(String key)<code> and
 * <p><code>set<strong>Property</strong>(String key, Object value)<code>,
 * <p>where <code><strong>Property</strong></code> must be replaced
 * by the name of the property.
 * @see java.beans.PropertyDescriptor
 *
 * @author Rey Francois
 * @author Gregor Rayman
 * @version $Revision: 689831 $ $Date: 2008-08-28 15:12:13 +0100 (Thu, 28 Aug 2008) $
 */


public class MappedPropertyDescriptor extends PropertyDescriptor {
    // ----------------------------------------------------- Instance Variables

    /**
     * The underlying data type of the property we are describing.
     */
    private Reference mappedPropertyTypeRef;

    /**
     * The reader method for this property (if any).
     */
    private MappedMethodReference mappedReadMethodRef;

    /**
     * The writer method for this property (if any).
     */
    private MappedMethodReference mappedWriteMethodRef;

    /**
     * The parameter types array for the reader method signature.
     */
    private static final Class[] STRING_CLASS_PARAMETER = new Class[]{String.class};

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

    /**
     * Constructs a MappedPropertyDescriptor for a property that follows
     * the standard Java convention by having getFoo and setFoo
     * accessor methods, with the addition of a String parameter (the key).
     * Thus if the argument name is "fred", it will
     * assume that the writer method is "setFred" and the reader method
     * is "getFred".  Note that the property name should start with a lower
     * case character, which will be capitalized in the method names.
     *
     * @param propertyName The programmatic name of the property.
     * @param beanClass The Class object for the target bean.  For
     *        example sun.beans.OurButton.class.
     *
     * @exception IntrospectionException if an exception occurs during
     *              introspection.
     */
    public MappedPropertyDescriptor(String propertyName, Class beanClass)
            throws IntrospectionException {

        super(propertyName, null, null);
        
        if (propertyName == null || propertyName.length() == 0) {
            throw new IntrospectionException("bad property name: " +
                    propertyName + " on class: " + beanClass.getClass().getName());
        }

        setName(propertyName);
        String base = capitalizePropertyName(propertyName);
        
        // Look for mapped read method and matching write method
        Method mappedReadMethod = null;
        Method mappedWriteMethod = null;
        try {
            try {
                mappedReadMethod = getMethod(beanClass, "get" + base,
                        STRING_CLASS_PARAMETER);
            } catch (IntrospectionException e) {
                mappedReadMethod = getMethod(beanClass, "is" + base,
                        STRING_CLASS_PARAMETER);
            }
            Class[] params = { String.class, mappedReadMethod.getReturnType() };
            mappedWriteMethod = getMethod(beanClass, "set" + base, params);
        } catch (IntrospectionException e) {
            /* Swallow IntrospectionException
             * TODO: Why?
             */
        }
        
        // If there's no read method, then look for just a write method 
        if (mappedReadMethod == null) {
            mappedWriteMethod = getMethod(beanClass, "set" + base, 2);
        }

        if ((mappedReadMethod == null) && (mappedWriteMethod == null)) {
            throw new IntrospectionException("Property '" + propertyName +
                    "' not found on " +
                    beanClass.getName());
        }
        mappedReadMethodRef  = new MappedMethodReference(mappedReadMethod);
        mappedWriteMethodRef = new MappedMethodReference(mappedWriteMethod);
        
        findMappedPropertyType();
    }


    /**
     * This constructor takes the name of a mapped property, and method
     * names for reading and writing the property.
     *
     * @param propertyName The programmatic name of the property.
     * @param beanClass The Class object for the target bean.  For
     *        example sun.beans.OurButton.class.
     * @param mappedGetterName The name of the method used for
     *          reading one of the property values.  May be null if the
     *          property is write-only.
     * @param mappedSetterName The name of the method used for writing
     *          one of the property values.  May be null if the property is
     *          read-only.
     *
     * @exception IntrospectionException if an exception occurs during
     *              introspection.
     */
    public MappedPropertyDescriptor(String propertyName, Class beanClass,
                                    String mappedGetterName, String mappedSetterName)
            throws IntrospectionException {

        super(propertyName, null, null);

        if (propertyName == null || propertyName.length() == 0) {
            throw new IntrospectionException("bad property name: " +
                    propertyName);
        }
        setName(propertyName);

        // search the mapped get and set methods
        Method mappedReadMethod = null;
        Method mappedWriteMethod = null;
        mappedReadMethod =
            getMethod(beanClass, mappedGetterName, STRING_CLASS_PARAMETER);

        if (mappedReadMethod != null) {
            Class[] params = { String.class, mappedReadMethod.getReturnType() };
            mappedWriteMethod = 
                getMethod(beanClass, mappedSetterName, params);
        } else {
            mappedWriteMethod =
                getMethod(beanClass, mappedSetterName, 2);
        }
        mappedReadMethodRef  = new MappedMethodReference(mappedReadMethod);
        mappedWriteMethodRef = new MappedMethodReference(mappedWriteMethod);

        findMappedPropertyType();
    }

    /**
     * This constructor takes the name of a mapped property, and Method
     * objects for reading and writing the property.
     *
     * @param propertyName The programmatic name of the property.
     * @param mappedGetter The method used for reading one of
     *          the property values.  May be be null if the property
     *          is write-only.
     * @param mappedSetter The method used for writing one the
     *          property values.  May be null if the property is read-only.
     *
     * @exception IntrospectionException if an exception occurs during
     *              introspection.
     */
    public MappedPropertyDescriptor(String propertyName,
                                    Method mappedGetter, Method mappedSetter)
            throws IntrospectionException {

        super(propertyName, mappedGetter, mappedSetter);

        if (propertyName == null || propertyName.length() == 0) {
            throw new IntrospectionException("bad property name: " +
                    propertyName);
        }

        setName(propertyName);
        mappedReadMethodRef  = new MappedMethodReference(mappedGetter);
        mappedWriteMethodRef = new MappedMethodReference(mappedSetter);
        findMappedPropertyType();
    }

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

    /**
     * Gets the Class object for the property values.
     *
     * @return The Java type info for the property values.  Note that
     * the "Class" object may describe a built-in Java type such as "int".
     * The result may be "null" if this is a mapped property that
     * does not support non-keyed access.
     * <p>
     * This is the type that will be returned by the mappedReadMethod.
     */
    public Class getMappedPropertyType() {
        return (Class)mappedPropertyTypeRef.get();
    }

    /**
     * Gets the method that should be used to read one of the property value.
     *
     * @return The method that should be used to read the property value.
     * May return null if the property can't be read.
     */
    public Method getMappedReadMethod() {
        return mappedReadMethodRef.get();
    }

    /**
     * Sets the method that should be used to read one of the property value.
     *
     * @param mappedGetter The mapped getter method.
     * @throws IntrospectionException If an error occurs finding the
     * mapped property
     */
    public void setMappedReadMethod(Method mappedGetter)
            throws IntrospectionException {
        mappedReadMethodRef = new MappedMethodReference(mappedGetter);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩在线观看一区二区| 欧美国产日韩一二三区| 国产精品不卡在线| 91国偷自产一区二区三区观看| 亚洲午夜在线观看视频在线| 日韩午夜在线观看| av在线不卡电影| 亚洲精品日韩综合观看成人91| 91精品国产高清一区二区三区 | 美女免费视频一区二区| 欧美日韩和欧美的一区二区| 一区二区三区中文在线| 日韩免费一区二区| 99国产一区二区三精品乱码| 日日夜夜免费精品| 中文字幕精品—区二区四季| 欧美系列在线观看| 国产.精品.日韩.另类.中文.在线.播放| 日本一区二区三区久久久久久久久不 | 久久se这里有精品| 一区二区三区日韩欧美精品| 26uuu久久天堂性欧美| 日本韩国一区二区三区| 男男gaygay亚洲| 在线观看91av| 加勒比av一区二区| 中文字幕一区视频| 欧美日韩一区二区三区在线看| 国产激情一区二区三区四区| 亚洲图片欧美综合| 中文字幕欧美区| 日韩一区二区免费电影| 91久久国产综合久久| 国产成人精品在线看| 日韩av一二三| 亚洲高清视频的网址| 最新热久久免费视频| 久久精品一区二区三区四区| 日韩欧美一级二级三级| 欧美色男人天堂| 色域天天综合网| 成人免费高清视频| 国产一区二区三区免费播放| 亚洲夂夂婷婷色拍ww47| 国产精品国产三级国产有无不卡 | 中文字幕欧美区| 欧美网站大全在线观看| 一本一道久久a久久精品综合蜜臀| 日韩精品亚洲专区| 亚洲欧美日本韩国| 亚洲视频你懂的| 日韩美女啊v在线免费观看| 国产欧美久久久精品影院| 久久久久国产精品人| 欧美性大战久久久| 欧美人xxxx| 成人在线综合网站| 国产成人无遮挡在线视频| 日韩av不卡在线观看| 五月婷婷综合激情| 亚洲色图欧洲色图婷婷| 国产欧美日韩在线| 欧美极品aⅴ影院| 亚洲欧洲国产专区| 亚洲欧美偷拍卡通变态| 亚洲视频一区二区免费在线观看| 亚洲欧美成人一区二区三区| 亚洲免费资源在线播放| 亚洲最新视频在线播放| 综合久久久久综合| 亚洲三级久久久| 亚洲激情六月丁香| 亚洲综合另类小说| 亚洲资源中文字幕| 日韩在线一二三区| 天堂影院一区二区| 另类人妖一区二区av| 日韩国产在线观看| 久久精品噜噜噜成人av农村| 国产经典欧美精品| 99精品黄色片免费大全| 不卡影院免费观看| 国产河南妇女毛片精品久久久| 青青草成人在线观看| 国产主播一区二区三区| 波多野结衣欧美| 欧美中文字幕久久 | 国产精品538一区二区在线| 成人av资源在线| 欧美色网站导航| 日韩欧美国产综合一区| 欧美激情艳妇裸体舞| 伊人色综合久久天天人手人婷| 天天色天天爱天天射综合| 国产一区二区三区电影在线观看| 成人深夜福利app| 欧美三片在线视频观看| 欧美精品一区视频| 亚洲人妖av一区二区| 亚洲v日本v欧美v久久精品| 亚洲另类一区二区| 亚洲成人av免费| 日韩二区在线观看| 精品一区二区国语对白| 成人av资源站| 欧美一级艳片视频免费观看| 国产精品国产三级国产普通话三级| 亚洲成人黄色影院| 粉嫩绯色av一区二区在线观看| 欧美日韩成人一区| 国产精品免费网站在线观看| 日日夜夜免费精品视频| 精品日本一线二线三线不卡| 亚洲人成精品久久久久久| 男女性色大片免费观看一区二区| 91在线免费看| 精品电影一区二区| 午夜久久久久久| 色综合天天视频在线观看| 精品99久久久久久| 亚洲高清免费在线| 91在线视频播放地址| 国产日韩三级在线| 日韩福利视频导航| 欧美亚洲综合在线| 国产精品无遮挡| 老司机一区二区| 欧美老肥妇做.爰bbww视频| 2021国产精品久久精品| 亚洲国产一区二区在线播放| 日本视频一区二区三区| av不卡免费电影| 26uuu国产在线精品一区二区| 视频在线观看国产精品| 欧洲一区在线观看| 亚洲人成影院在线观看| 不卡影院免费观看| 国产日韩欧美亚洲| 精品中文字幕一区二区小辣椒| 欧美日韩精品一区二区在线播放| 综合婷婷亚洲小说| av激情综合网| 国产精品国产a级| 黄色日韩三级电影| 日韩视频一区在线观看| 日韩精品一二三| 国产激情精品久久久第一区二区| 色综合天天综合网天天看片| 久久日一线二线三线suv| 日韩极品在线观看| 欧美精品亚洲二区| 日韩精品亚洲专区| 9191国产精品| 美女任你摸久久| 精品国产乱子伦一区| 激情六月婷婷久久| 久久免费午夜影院| 国产精品69毛片高清亚洲| 久久精品无码一区二区三区| 国产一区二区美女| 国产目拍亚洲精品99久久精品| 精品一区二区精品| 91麻豆精品国产无毒不卡在线观看| 亚洲一级二级在线| 色狠狠桃花综合| 午夜精品视频在线观看| 91精品国产综合久久久久久久| 亚洲精品国产一区二区精华液| 蜜臀久久99精品久久久画质超高清| 欧美三级视频在线| 美国一区二区三区在线播放| 精品日韩一区二区| 成人一区二区三区视频| 成人欧美一区二区三区| 在线观看一区二区视频| 日av在线不卡| 国产拍揄自揄精品视频麻豆| 91在线观看视频| 亚洲成人av免费| 久久午夜国产精品| 91一区二区在线| 日韩av二区在线播放| 日本一区二区在线不卡| 91精品一区二区三区久久久久久| 国产成人在线观看| 午夜精品123| 最新久久zyz资源站| 日韩写真欧美这视频| 色婷婷国产精品| 国产电影一区二区三区| 亚洲成人av电影在线| 日韩一区欧美小说| 欧美精品一区二区三| 欧美日韩视频在线一区二区| 99热这里都是精品| 国产精品伊人色| 免费成人在线视频观看| 亚洲精品成人少妇| 国产精品久久久99| 久久精品亚洲精品国产欧美|