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

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

?? basicdynaclass.java

?? 這是一個有關common beanutils 的源碼
?? JAVA
字號:
/*
 * 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.io.Serializable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;


/**
 * <p>Minimal implementation of the <code>DynaClass</code> interface.  Can be
 * used as a convenience base class for more sophisticated implementations.</p> *
 * <p><strong>IMPLEMENTATION NOTE</strong> - The <code>DynaBean</code>
 * implementation class supplied to our constructor MUST have a one-argument
 * constructor of its own that accepts a <code>DynaClass</code>.  This is
 * used to associate the DynaBean instance with this DynaClass.</p>
 *
 * @author Craig McClanahan
 * @version $Revision: 556229 $ $Date: 2007-07-14 07:11:19 +0100 (Sat, 14 Jul 2007) $
 */

public class BasicDynaClass implements DynaClass, Serializable {


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


    /**
     * Construct a new BasicDynaClass with default parameters.
     */
    public BasicDynaClass() {

        this(null, null, null);

    }


    /**
     * Construct a new BasicDynaClass with the specified parameters.
     *
     * @param name Name of this DynaBean class
     * @param dynaBeanClass The implementation class for new instances
     */
    public BasicDynaClass(String name, Class dynaBeanClass) {

        this(name, dynaBeanClass, null);

    }


    /**
     * Construct a new BasicDynaClass with the specified parameters.
     *
     * @param name Name of this DynaBean class
     * @param dynaBeanClass The implementation class for new intances
     * @param properties Property descriptors for the supported properties
     */
    public BasicDynaClass(String name, Class dynaBeanClass,
                          DynaProperty[] properties) {

        super();
        if (name != null) {
            this.name = name;
        }
        if (dynaBeanClass == null) {
            dynaBeanClass = BasicDynaBean.class;
        }
        setDynaBeanClass(dynaBeanClass);
        if (properties != null) {
            setProperties(properties);
        }

    }


    // ----------------------------------------------------- Instance Variables


    /**
     * The constructor of the <code>dynaBeanClass</code> that we will use
     * for creating new instances.
     */
    protected transient Constructor constructor = null;


    /**
     * The method signature of the constructor we will use to create
     * new DynaBean instances.
     */
    protected static Class[] constructorTypes = { DynaClass.class };


    /**
     * The argument values to be passed to the constructore we will use
     * to create new DynaBean instances.
     */
    protected Object[] constructorValues = { this };


    /**
     * The <code>DynaBean</code> implementation class we will use for
     * creating new instances.
     */
    protected Class dynaBeanClass = BasicDynaBean.class;


    /**
     * The "name" of this DynaBean class.
     */
    protected String name = this.getClass().getName();


    /**
     * The set of dynamic properties that are part of this DynaClass.
     */
    protected DynaProperty[] properties = new DynaProperty[0];


    /**
     * The set of dynamic properties that are part of this DynaClass,
     * keyed by the property name.  Individual descriptor instances will
     * be the same instances as those in the <code>properties</code> list.
     */
    protected HashMap propertiesMap = new HashMap();


    // ------------------------------------------------------ DynaClass Methods


    /**
     * Return the name of this DynaClass (analogous to the
     * <code>getName()</code> method of <code>java.lang.Class</code), which
     * allows the same <code>DynaClass</code> implementation class to support
     * different dynamic classes, with different sets of properties.
     *
     * @return the name of the DynaClass
     */
    public String getName() {

        return (this.name);

    }


    /**
     * Return a property descriptor for the specified property, if it exists;
     * otherwise, return <code>null</code>.
     *
     * @param name Name of the dynamic property for which a descriptor
     *  is requested
     * @return The descriptor for the specified property
     *
     * @exception IllegalArgumentException if no property name is specified
     */
    public DynaProperty getDynaProperty(String name) {

        if (name == null) {
            throw new IllegalArgumentException
                    ("No property name specified");
        }
        return ((DynaProperty) propertiesMap.get(name));

    }


    /**
     * <p>Return an array of <code>ProperyDescriptors</code> for the properties
     * currently defined in this DynaClass.  If no properties are defined, a
     * zero-length array will be returned.</p>
     *
     * <p><strong>FIXME</strong> - Should we really be implementing
     * <code>getBeanInfo()</code> instead, which returns property descriptors
     * and a bunch of other stuff?</p>
     *
     * @return the set of properties for this DynaClass
     */
    public DynaProperty[] getDynaProperties() {

        return (properties);

    }


    /**
     * Instantiate and return a new DynaBean instance, associated
     * with this DynaClass.
     *
     * @return A new <code>DynaBean</code> instance
     * @exception IllegalAccessException if the Class or the appropriate
     *  constructor is not accessible
     * @exception InstantiationException if this Class represents an abstract
     *  class, an array class, a primitive type, or void; or if instantiation
     *  fails for some other reason
     */
    public DynaBean newInstance()
            throws IllegalAccessException, InstantiationException {

        try {
            // Refind the constructor after a deserialization (if needed)
            if (constructor == null) {
                setDynaBeanClass(this.dynaBeanClass);
            }
            // Invoke the constructor to create a new bean instance
            return ((DynaBean) constructor.newInstance(constructorValues));
        } catch (InvocationTargetException e) {
            throw new InstantiationException
                    (e.getTargetException().getMessage());
        }

    }


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


    /**
     * Return the Class object we will use to create new instances in the
     * <code>newInstance()</code> method.  This Class <strong>MUST</strong>
     * implement the <code>DynaBean</code> interface.
     *
     * @return The class of the {@link DynaBean}
     */
    public Class getDynaBeanClass() {

        return (this.dynaBeanClass);

    }


    // ------------------------------------------------------ Protected Methods


    /**
     * Set the Class object we will use to create new instances in the
     * <code>newInstance()</code> method.  This Class <strong>MUST</strong>
     * implement the <code>DynaBean</code> interface.
     *
     * @param dynaBeanClass The new Class object
     *
     * @exception IllegalArgumentException if the specified Class does not
     *  implement the <code>DynaBean</code> interface
     */
    protected void setDynaBeanClass(Class dynaBeanClass) {

        // Validate the argument type specified
        if (dynaBeanClass.isInterface()) {
            throw new IllegalArgumentException
                    ("Class " + dynaBeanClass.getName() +
                    " is an interface, not a class");
        }
        if (!DynaBean.class.isAssignableFrom(dynaBeanClass)) {
            throw new IllegalArgumentException
                    ("Class " + dynaBeanClass.getName() +
                    " does not implement DynaBean");
        }

        // Identify the Constructor we will use in newInstance()
        try {
            this.constructor = dynaBeanClass.getConstructor(constructorTypes);
        } catch (NoSuchMethodException e) {
            throw new IllegalArgumentException
                    ("Class " + dynaBeanClass.getName() +
                    " does not have an appropriate constructor");
        }
        this.dynaBeanClass = dynaBeanClass;

    }


    /**
     * Set the list of dynamic properties supported by this DynaClass.
     *
     * @param properties List of dynamic properties to be supported
     */
    protected void setProperties(DynaProperty[] properties) {

        this.properties = properties;
        propertiesMap.clear();
        for (int i = 0; i < properties.length; i++) {
            propertiesMap.put(properties[i].getName(), properties[i]);
        }

    }


}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产九九视频一区二区三区| 91精品国产综合久久精品图片| 精品久久久久一区二区国产| 欧美日韩综合不卡| 欧美日韩久久一区二区| 亚洲成人久久影院| 91精品国产福利在线观看| 亚洲一区二区三区四区的| 欧美最新大片在线看| 日韩影院精彩在线| 精品少妇一区二区三区在线视频| 国内精品伊人久久久久av一坑| 国产欧美精品一区aⅴ影院| 成av人片一区二区| 一区精品在线播放| 欧美区视频在线观看| 看国产成人h片视频| 中文在线一区二区| 色久优优欧美色久优优| 久久精品国产99| 国产精品免费久久久久| 欧美影院一区二区三区| 韩国欧美国产1区| 亚洲日本va午夜在线电影| 欧美猛男男办公室激情| 国产传媒日韩欧美成人| 亚洲综合av网| 国产午夜精品一区二区三区四区| 91麻豆成人久久精品二区三区| 五月综合激情网| 欧美激情中文不卡| 欧美高清视频在线高清观看mv色露露十八| 狠狠色丁香九九婷婷综合五月| 成人免费在线视频观看| 日韩免费高清视频| 色成年激情久久综合| 韩国精品一区二区| 亚洲一区二区高清| 久久精品无码一区二区三区| 欧美午夜影院一区| 成人免费电影视频| 青青草伊人久久| 亚洲综合视频网| 中文字幕国产一区| 欧美一二三四区在线| 色综合久久综合网欧美综合网| 卡一卡二国产精品| 亚洲韩国精品一区| 一区精品在线播放| 国产日产亚洲精品系列| 欧美一区二区三区人| 色噜噜狠狠色综合中国| 成人自拍视频在线观看| 毛片基地黄久久久久久天堂| 亚洲综合色自拍一区| 国产精品免费网站在线观看| 久久综合久久综合九色| 69p69国产精品| 欧美在线观看一二区| 成人综合激情网| 国产激情91久久精品导航 | 国产精品中文字幕日韩精品| 五月婷婷综合激情| 亚洲一区二区三区视频在线播放| 国产精品无码永久免费888| 亚洲精品一区在线观看| 欧美一区二区久久| 欧美伊人久久大香线蕉综合69| 99久久精品情趣| 不卡一区二区在线| 成人免费小视频| 色婷婷av久久久久久久| 99re热视频精品| 成人黄色777网| 国产丶欧美丶日本不卡视频| 韩国成人在线视频| 紧缚捆绑精品一区二区| 蜜臀国产一区二区三区在线播放| 婷婷亚洲久悠悠色悠在线播放| 亚洲一区免费在线观看| 亚洲综合区在线| 亚洲电影一级黄| 日本成人在线不卡视频| 免费成人深夜小野草| 精品一区精品二区高清| 国产制服丝袜一区| 激情综合色播五月| 国产精品正在播放| 国产一区二区三区日韩| 国产成人午夜精品5599 | 日本最新不卡在线| 青青青爽久久午夜综合久久午夜 | 久久精品人人做人人爽人人| 国产欧美综合色| 中文字幕乱码久久午夜不卡| 亚洲蜜臀av乱码久久精品| 亚洲激情综合网| 日韩国产精品久久久| 麻豆国产欧美日韩综合精品二区| 精品一区二区三区免费观看| 成人午夜激情影院| 91日韩在线专区| 欧美日韩成人综合天天影院| 精品久久久影院| 亚洲欧洲av在线| 日韩精品一级二级 | 久久电影网站中文字幕| 国产成人午夜片在线观看高清观看| voyeur盗摄精品| 7777女厕盗摄久久久| 国产亚洲综合在线| 亚洲精品久久久久久国产精华液| 日韩国产欧美在线播放| 国产成人午夜99999| 91福利资源站| 精品国产电影一区二区| 亚洲日本成人在线观看| 青青草成人在线观看| 91视频xxxx| 精品免费日韩av| 亚洲激情图片qvod| 精品一区二区三区蜜桃| 91蜜桃网址入口| 久久久综合视频| 56国语精品自产拍在线观看| 欧亚一区二区三区| 久久久九九九九| 天天亚洲美女在线视频| 成人高清免费观看| 欧美电视剧在线观看完整版| 亚洲欧美日韩在线| 国产乱人伦偷精品视频不卡| 精品视频在线免费| 中文字幕日韩一区| 精品一二三四区| 欧美视频在线一区| 中文字幕一区在线| 精品在线免费观看| 欧美日韩精品一区二区三区蜜桃 | 国产精品嫩草99a| 精品制服美女丁香| 欧美日韩dvd在线观看| 国产精品久久久久一区 | 欧美激情一区二区三区全黄| 日韩电影在线一区| 在线观看亚洲专区| 国产精品私房写真福利视频| 久久99久久99小草精品免视看| 欧美在线一二三四区| 综合欧美亚洲日本| 国产精品一级在线| 亚洲精品一区二区三区四区高清 | 国产精品久久久久久亚洲毛片 | 一本色道a无线码一区v| 中国色在线观看另类| 国内久久精品视频| 欧美成人a视频| 蜜臀久久久99精品久久久久久| 欧美视频一区二区三区| 伊人开心综合网| 色婷婷狠狠综合| 亚洲激情第一区| 在线看一区二区| 亚洲人亚洲人成电影网站色| 99久久精品情趣| 亚洲美女一区二区三区| 972aa.com艺术欧美| 亚洲精品视频在线| 在线视频国内自拍亚洲视频| 亚洲少妇30p| 在线观看视频一区二区| 夜夜嗨av一区二区三区四季av| 色哟哟一区二区| 亚洲一区二区三区四区五区黄| 在线精品视频一区二区| 一级特黄大欧美久久久| 欧美日韩中文字幕一区二区| 视频一区二区欧美| 欧美一级久久久久久久大片| 亚洲成人av在线电影| 欧美精品一二三| 久久99久久99精品免视看婷婷| 久久久噜噜噜久久人人看 | 自拍av一区二区三区| 一本色道久久加勒比精品| 亚洲一二三四久久| 欧美一区二区三区喷汁尤物| 激情综合色播五月| 国产精品盗摄一区二区三区| 一本久久综合亚洲鲁鲁五月天 | 欧美一级日韩免费不卡| 免费一级欧美片在线观看| 精品剧情v国产在线观看在线| 国产另类ts人妖一区二区| 中文字幕在线观看一区| 欧美久久婷婷综合色| 国产一区二区中文字幕| √…a在线天堂一区| 欧美精品v国产精品v日韩精品| 国产伦精品一区二区三区在线观看 |