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

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

?? propertyutilsbean.java

?? osworkflow修改版本
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/* * $Header: /cvs/osworkflow/src/designer/com/opensymphony/workflow/designer/beanutils/PropertyUtilsBean.java,v 1.3 2004/04/16 10:36:29 hani Exp $ * $Revision: 1.3 $ * $Date: 2004/04/16 10:36:29 $ * * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in *    the documentation and/or other materials provided with the *    distribution. * * 3. The end-user documentation included with the redistribution, *    if any, must include the following acknowledgement: *       "This product includes software developed by the *        Apache Software Foundation (http://www.apache.org/)." *    Alternately, this acknowledgement may appear in the software itself, *    if and wherever such third-party acknowledgements normally appear. * * 4. The names "Apache", "The Jakarta Project", "Commons", and "Apache Software *    Foundation" must not be used to endorse or promote products derived *    from this software without prior written permission. For written *    permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", *    "Apache" nor may "Apache" appear in their names without prior *    written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation.  For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */package com.opensymphony.workflow.designer.beanutils;import java.beans.*;import java.lang.reflect.Array;import java.lang.reflect.InvocationTargetException;import java.lang.reflect.Method;import java.util.*;/** * Utility methods for using Java Reflection APIs to facilitate generic * property getter and setter operations on Java objects.  Much of this * code was originally included in <code>BeanUtils</code>, but has been * separated because of the volume of code involved. * <p/> * In general, the objects that are examined and modified using these * methods are expected to conform to the property getter and setter method * naming conventions described in the JavaBeans Specification (Version 1.0.1). * No data type conversions are performed, and there are no usage of any * <code>PropertyEditor</code> classes that have been registered, although * a convenient way to access the registered classes themselves is included. * <p/> * For the purposes of this class, five formats for referencing a particular * property value of a bean are defined, with the layout of an identifying * String in parentheses: * <ul> * <li><strong>Simple (<code>name</code>)</strong> - The specified * <code>name</code> identifies an individual property of a particular * JavaBean.  The name of the actual getter or setter method to be used * is determined using standard JavaBeans instrospection, so that (unless * overridden by a <code>BeanInfo</code> class, a property named "xyz" * will have a getter method named <code>getXyz()</code> or (for boolean * properties only) <code>isXyz()</code>, and a setter method named * <code>setXyz()</code>.</li> * <li><strong>Nested (<code>name1.name2.name3</code>)</strong> The first * name element is used to select a property getter, as for simple * references above.  The object returned for this property is then * consulted, using the same approach, for a property getter for a * property named <code>name2</code>, and so on.  The property value that * is ultimately retrieved or modified is the one identified by the * last name element.</li> * <li><strong>Indexed (<code>name[index]</code>)</strong> - The underlying * property value is assumed to be an array, or this JavaBean is assumed * to have indexed property getter and setter methods.  The appropriate * (zero-relative) entry in the array is selected.  <code>List</code> * objects are now also supported for read/write.  You simply need to define * a getter that returns the <code>List</code></li> * <li><strong>Mapped (<code>name(key)</code>)</strong> - The JavaBean * is assumed to have an property getter and setter methods with an * additional attribute of type <code>java.lang.String</code>.</li> * <li><strong>Combined (<code>name1.name2[index].name3(key)</code>)</strong> - * Combining mapped, nested, and indexed references is also * supported.</li> * </ul> * * @author Craig R. McClanahan * @author Ralph Schaer * @author Chris Audley * @author Rey Fran鏾is * @author Gregor Ra齧an * @author Jan Sorensen * @author Scott Sanders * @version $Revision: 1.3 $ $Date: 2004/04/16 10:36:29 $ * @see PropertyUtils * @since 1.7 */public class PropertyUtilsBean{  private static final PropertyUtilsBean instance = new PropertyUtilsBean();  // --------------------------------------------------------- Class Methods  protected static PropertyUtilsBean getInstance()  {    return instance;  }  // --------------------------------------------------------- Variables  /**   * The cache of PropertyDescriptor arrays for beans we have already   * introspected, keyed by the java.lang.Class of this object.   */  private Map descriptorsCache = null;  private Map mappedDescriptorsCache = null;  // ---------------------------------------------------------- Constructors  /**   * Base constructor   */  public PropertyUtilsBean()  {    descriptorsCache = new HashMap();    mappedDescriptorsCache = new HashMap();  }  // --------------------------------------------------------- Public Methods  /**   * Clear any cached property descriptors information for all classes   * loaded by any class loaders.  This is useful in cases where class   * loaders are thrown away to implement class reloading.   */  public void clearDescriptors()  {    descriptorsCache.clear();    mappedDescriptorsCache.clear();    Introspector.flushCaches();  }  /**   * <p>Copy property values from the "origin" bean to the "destination" bean   * for all cases where the property names are the same (even though the   * actual getter and setter methods might have been customized via   * <code>BeanInfo</code> classes).  No conversions are performed on the   * actual property values -- it is assumed that the values retrieved from   * the origin bean are assignment-compatible with the types expected by   * the destination bean.</p>   * <p/>   * <p>If the origin "bean" is actually a <code>Map</code>, it is assumed   * to contain String-valued <strong>simple</strong> property names as the keys, pointing   * at the corresponding property values that will be set in the destination   * bean.<strong>Note</strong> that this method is intended to perform   * a "shallow copy" of the properties and so complex properties   * (for example, nested ones) will not be copied.</p>   *   * @param dest Destination bean whose properties are modified   * @param orig Origin bean whose properties are retrieved   * @throws IllegalAccessException    if the caller does not have   *                                   access to the property accessor method   * @throws IllegalArgumentException  if the <code>dest</code> or   *                                   <code>orig</code> argument is null   * @throws InvocationTargetException if the property accessor method   *                                   throws an exception   * @throws NoSuchMethodException     if an accessor method for this   *                                   propety cannot be found   */  public void copyProperties(Object dest, Object orig) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException  {    if(dest == null)    {      throw new IllegalArgumentException("No destination bean specified");    }    if(orig == null)    {      throw new IllegalArgumentException("No origin bean specified");    }    if(orig instanceof Map)    {      Iterator names = ((Map)orig).keySet().iterator();      while(names.hasNext())      {        String name = (String)names.next();        if(isWriteable(dest, name))        {          Object value = ((Map)orig).get(name);          setSimpleProperty(dest, name, value);        }      }    }    else /* if (orig is a standard JavaBean) */    {      PropertyDescriptor origDescriptors[] = getPropertyDescriptors(orig);      for(int i = 0; i < origDescriptors.length; i++)      {        String name = origDescriptors[i].getName();        if(isReadable(orig, name))        {          if(isWriteable(dest, name))          {            Object value = getSimpleProperty(orig, name);            setSimpleProperty(dest, name, value);          }        }      }    }  }  /**   * <p>Return the entire set of properties for which the specified bean   * provides a read method.  This map contains the unconverted property   * values for all properties for which a read method is provided   * (i.e. where the <code>getReadMethod()</code> returns non-null).</p>   * <p/>   * <p><strong>FIXME</strong> - Does not account for mapped properties.</p>   *   * @param bean Bean whose properties are to be extracted   * @throws IllegalAccessException    if the caller does not have   *                                   access to the property accessor method   * @throws IllegalArgumentException  if <code>bean</code> is null   * @throws InvocationTargetException if the property accessor method   *                                   throws an exception   * @throws NoSuchMethodException     if an accessor method for this   *                                   propety cannot be found   */  public Map describe(Object bean) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException  {    if(bean == null)    {      throw new IllegalArgumentException("No bean specified");    }    Map description = new HashMap();    PropertyDescriptor descriptors[] = getPropertyDescriptors(bean);    for(int i = 0; i < descriptors.length; i++)    {      String name = descriptors[i].getName();      if(descriptors[i].getReadMethod() != null)        description.put(name, getProperty(bean, name));    }    return (description);  }  /**   * Return the value of the specified indexed property of the specified   * bean, with no type conversions.  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.  In addition to supporting the JavaBeans specification, this   * method has been extended to support <code>List</code> objects as well.   *   * @param bean Bean whose property is to be extracted   * @param name <code>propertyname[index]</code> of the property value   *             to be extracted   * @throws ArrayIndexOutOfBoundsException if the specified index   *                                        is outside the valid range for the underlying array   * @throws IllegalAccessException         if the caller does not have   *                                        access to the property accessor method   * @throws IllegalArgumentException       if <code>bean</code> or   *                                        <code>name</code> is null   * @throws InvocationTargetException      if the property accessor method   *                                        throws an exception   * @throws NoSuchMethodException          if an accessor method for this   *                                        propety cannot be found   */  public Object getIndexedProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException  {    if(bean == null)    {      throw new IllegalArgumentException("No bean specified");    }    if(name == null)    {      throw new IllegalArgumentException("No name specified");    }    // Identify the index of the requested individual property    int delim = name.indexOf(PropertyUtils.INDEXED_DELIM);    int delim2 = name.indexOf(PropertyUtils.INDEXED_DELIM2);    if((delim < 0) || (delim2 <= delim))    {      throw new IllegalArgumentException("Invalid indexed property '" + name + "'");    }    int index = -1;    try    {      String subscript = name.substring(delim + 1, delim2);      index = Integer.parseInt(subscript);    }    catch(NumberFormatException e)    {      throw new IllegalArgumentException("Invalid indexed property '" + name + "'");    }    name = name.substring(0, delim);    // Request the specified indexed property value    return (getIndexedProperty(bean, name, index));  }  /**   * Return the value of the specified indexed property of the specified   * bean, with no type conversions.  In addition to supporting the JavaBeans   * specification, this method has been extended to support   * <code>List</code> objects as well.   *   * @param bean  Bean whose property is to be extracted

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本在线高清不卡dvd| 国产女同互慰高潮91漫画| 国产亚洲污的网站| 亚洲自拍偷拍麻豆| 福利电影一区二区三区| 日韩午夜中文字幕| 亚洲综合小说图片| 91视频.com| 中文久久乱码一区二区| 久久99国产精品成人| 这里只有精品视频在线观看| 亚洲精品国产无套在线观| 成人av第一页| 中文字幕精品一区| 国产一区二区三区不卡在线观看| 欧美亚洲国产一区在线观看网站| 日韩美女视频一区| 成人高清在线视频| 国产亚洲福利社区一区| 国产一区二区三区观看| 26uuu精品一区二区在线观看| 日韩精品电影在线观看| 欧美日韩亚洲不卡| 亚洲在线视频一区| 在线一区二区三区做爰视频网站| 国产精品久线观看视频| 成人激情开心网| 亚洲婷婷综合久久一本伊一区| 成人少妇影院yyyy| 中文字幕日韩一区| 色婷婷激情久久| 一区二区三区在线高清| 欧美日韩一区二区三区四区| 亚洲午夜国产一区99re久久| 欧美丝袜丝nylons| 婷婷久久综合九色综合绿巨人| 精品视频1区2区| 日本aⅴ精品一区二区三区| 666欧美在线视频| 久久精品99久久久| 国产精品素人一区二区| 不卡在线观看av| 亚洲精品成人精品456| 欧美精品久久久久久久久老牛影院| 亚洲成人综合网站| 欧美成人欧美edvon| 国产乱国产乱300精品| 亚洲国产精品成人综合色在线婷婷| 粉嫩一区二区三区在线看| 国产精品久久久久7777按摩| 久久婷婷久久一区二区三区| 国产91精品精华液一区二区三区 | 中文字幕在线不卡国产视频| 99re在线精品| 天堂va蜜桃一区二区三区漫画版| 日韩欧美国产高清| 国产精品亚洲一区二区三区在线 | 97国产精品videossex| 亚洲一区二区精品久久av| 欧美日韩dvd在线观看| 国产一区二区三区av电影 | 婷婷国产在线综合| 精品国产91九色蝌蚪| 91在线视频免费观看| 日韩av不卡在线观看| 国产欧美一区二区精品秋霞影院| 色狠狠综合天天综合综合| 日本欧美加勒比视频| 亚洲欧洲一区二区三区| 欧美精品日日鲁夜夜添| 高清不卡在线观看av| 一区二区视频免费在线观看| 精品日韩一区二区三区免费视频| 97久久精品人人做人人爽| 午夜激情一区二区| 国产精品美女久久久久aⅴ国产馆| 欧美亚一区二区| 国产传媒久久文化传媒| 亚洲综合色婷婷| 国产欧美一区二区在线| 91精品国产综合久久精品性色| 国产成人亚洲综合a∨婷婷| 午夜精品久久久久久久久久| 国产精品女上位| 日韩一级精品视频在线观看| 日本韩国欧美一区| 国产91丝袜在线观看| 日韩电影免费在线| 一区二区三区中文字幕| 中文字幕二三区不卡| 日韩欧美国产综合在线一区二区三区| 91国产免费看| 成人v精品蜜桃久久一区| 看电视剧不卡顿的网站| 亚洲成人av一区| 成人欧美一区二区三区黑人麻豆 | 久久久亚洲精品石原莉奈| 欧美三级三级三级爽爽爽| 99这里只有久久精品视频| 国产精品中文字幕一区二区三区| 日韩1区2区日韩1区2区| 亚洲国产一二三| 亚洲国产日韩a在线播放性色| 亚洲欧美一区二区不卡| 国产亚洲精品超碰| 国产情人综合久久777777| 日韩欧美精品三级| 日韩限制级电影在线观看| 欧美日韩一二区| 欧美日本精品一区二区三区| 欧美日精品一区视频| 在线免费观看日韩欧美| 日韩欧美在线1卡| 精品久久久久久无| 日韩精品一区二区在线观看| 精品理论电影在线| 久久久久久久免费视频了| 久久久精品免费网站| 国产日韩欧美精品一区| 国产人成一区二区三区影院| 欧美国产日韩a欧美在线观看| 欧美极品xxx| 综合欧美亚洲日本| 亚洲影院理伦片| 日本不卡一区二区| 麻豆一区二区三区| 国产一区二区三区四区在线观看| 国产毛片精品一区| 成人午夜免费电影| 91福利在线看| 欧美一级国产精品| 国产视频一区二区在线| 中文字幕一区三区| 亚洲伊人伊色伊影伊综合网| 午夜精品久久久久久久久久| 精品制服美女久久| 国产成人在线网站| 色婷婷综合久久| 欧美一区二区三区免费大片| 亚洲精品在线观看视频| 国产精品色哟哟| 亚洲国产精品视频| 国产麻豆精品在线观看| 91黄色免费网站| 日韩免费一区二区三区在线播放| 国产偷国产偷亚洲高清人白洁 | 91久久人澡人人添人人爽欧美| 欧美日韩国产成人在线91| 日韩欧美二区三区| 国产精品国产a| 丝袜美腿亚洲色图| 福利电影一区二区| 欧美日韩成人高清| 日本一区二区三区四区| 香蕉乱码成人久久天堂爱免费| 韩国毛片一区二区三区| 色天天综合色天天久久| 欧美成人vr18sexvr| 亚洲欧洲日韩在线| 久久精品免费看| 在线亚洲免费视频| 久久精品这里都是精品| 亚洲高清视频中文字幕| 国产98色在线|日韩| 欧美一二区视频| 亚洲欧美韩国综合色| 久久99九九99精品| 欧美日韩另类一区| 亚洲日穴在线视频| 国产成人在线视频网站| 日韩三级电影网址| 一区二区视频免费在线观看| 国产经典欧美精品| 91精品蜜臀在线一区尤物| 亚洲日本一区二区| 国产91在线观看| 国产亚洲成av人在线观看导航| 日日夜夜精品视频天天综合网| 91在线无精精品入口| 国产色91在线| 狠狠色狠狠色合久久伊人| 欧美日韩国产经典色站一区二区三区 | 国产网站一区二区| 精品一区二区三区欧美| 欧美一区二区三区精品| 一区二区三区久久| 99久久国产综合精品色伊| 久久综合九色综合欧美就去吻| 午夜久久久影院| 色天天综合色天天久久| 亚洲欧美日韩精品久久久久| 国产成人免费视频网站| 久久精品欧美日韩| 国产在线国偷精品产拍免费yy | 蜜臀av一区二区三区| 欧美日韩久久一区| 日韩高清不卡一区| 欧美高清一级片在线| 日韩精品视频网站| 91麻豆精品国产91久久久久久久久 |