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

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

?? classmapfinder.java

?? 一個javabean的轉換與copy非常的好用希望大家好好研究一下
?? JAVA
字號:
/*
 * Copyright 2005-2007 the original author or authors.
 *
 * 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 net.sf.dozer.util.mapping.util;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import net.sf.dozer.util.mapping.fieldmap.ClassMap;


/**
 * @author tierney.matt
 * @author garsombke.franz
 */
public class ClassMapFinder {
  
  public ClassMap findClassMap(Map customMappings, Object sourceObj, Class destClass, String mapId, boolean isInstance) {
   ClassMap mapping = (ClassMap) customMappings.get(ClassMapKeyFactory.createKey(sourceObj.getClass(), destClass, mapId));
    
    // determine if it is an Interface or Abstract Class
    // iterate through the class maps and see if this class has any sub classes that are mapped to the source class OR
    // any of the source classes super classes
    // if we find a mapping don't even bother walking the tree
    if (mapping == null && !isInstance) {
      mapping = findInterfaceOrAbstractMapping(customMappings, destClass, sourceObj, mapId);
    }
    
    return mapping;
  }
  
  public List findInterfaceMappings(Map customMappings, Class sourceClass, Class destClass) {
    // If no existing cache entry is found, determine super type mapping and store in cache
    // Get interfaces
    Class[] sourceInterfaces = sourceClass.getInterfaces();
    Class[] destInterfaces = destClass.getInterfaces();
    List interfaceMaps = new ArrayList();

    for (int i = 0; i < destInterfaces.length; i++) {
      // see if the source class is mapped to the dest class
      ClassMap interfaceClassMap = (ClassMap) customMappings.get(ClassMapKeyFactory.createKey(sourceClass,
          destInterfaces[i]));
      if (interfaceClassMap != null) {
        interfaceMaps.add(interfaceClassMap);
      }
    }

    for (int i = 0; i < sourceInterfaces.length; i++) {
      // see if the source class is mapped to the dest class
      ClassMap interfaceClassMap = (ClassMap) customMappings.get(ClassMapKeyFactory.createKey(sourceInterfaces[i],
          destClass));
      if (interfaceClassMap != null) {
        interfaceMaps.add(interfaceClassMap);
      }
    }

    // multiple levels of custom mapping processed in wrong order - need to reverse
    Collections.reverse(interfaceMaps);

    return interfaceMaps;
  }  
  
  //TODO: what is logic difference between this method and checkForInterfaceMappingsInCustomMappings.  By the names
  //these methods seem to be trying to accomplish the same thing with a different implementation.  Also, one takes a map-id
  //and the other doesnt ??  somewhat confusing
  public ClassMap findInterfaceOrAbstractMapping(Map customMappings, Class destClass, Object sourceObj, String mapId) {
    ClassMap newClassMap = null;
    Class newClass = null;
    //Create a local copy of the custom mappings to avoid any rare thread synchronization issues while iterating
    //over the custom mappings.  See bug #1550275.
    Map localCustomMappings = new HashMap(customMappings);
    Iterator iter = localCustomMappings.keySet().iterator();
    while (iter.hasNext()) {
      ClassMap map = (ClassMap) localCustomMappings.get(iter.next());
      Class dest = map.getDestClass().getClassToMap();
      
      // is Assignable?
      // now that we have the a sub class for the abstract class or interface we need to
      // verify that the source class in the map IS a super class of the source object...or the source object itself.
      if (destClass.isAssignableFrom(dest)
          && (map.getSourceClass().getClassToMap().isAssignableFrom(sourceObj.getClass()) || map.getSourceClass()
              .getClassToMap().isInstance(sourceObj))
          // look for most specific mapping
          && (newClass == null || newClass.isAssignableFrom(dest))) {
        newClassMap = map;
        newClass = dest;
      }
    }
    return newClassMap;
  }
  
  
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产免费看久久精品| 国产精品色呦呦| 99亚偷拍自图区亚洲| 久久精品国产网站| 亚洲成人av在线电影| 一区二区三区产品免费精品久久75| 91精品国产一区二区| 不卡的看片网站| 国产99一区视频免费| 激情图片小说一区| 久久国产麻豆精品| 日韩极品在线观看| 亚洲国产成人高清精品| 亚洲色图第一区| 综合久久综合久久| 亚洲欧美日韩国产手机在线 | 琪琪久久久久日韩精品| 一个色妞综合视频在线观看| 国产精品成人免费精品自在线观看| 精品日本一线二线三线不卡| 日韩欧美色综合网站| 日韩视频123| 久久综合久久综合久久| 久久久www免费人成精品| 91精品在线观看入口| 精品欧美黑人一区二区三区| 精品999久久久| 国产嫩草影院久久久久| 国产精品天天摸av网| 一区免费观看视频| 一区二区三区在线视频免费观看| 亚洲欧洲三级电影| 亚洲一区二区三区在线看| 性感美女久久精品| 国产自产v一区二区三区c| 国产成人午夜99999| 91香蕉视频在线| 欧美日韩高清一区二区| 日韩午夜av一区| 中文字幕一区二区三区蜜月| 亚洲高清不卡在线| 久久福利视频一区二区| 丁香啪啪综合成人亚洲小说| 91蜜桃婷婷狠狠久久综合9色| 在线观看日韩国产| 精品久久国产字幕高潮| 国产精品久久久久国产精品日日| 亚洲超碰97人人做人人爱| 蜜臀久久99精品久久久久久9| 国产麻豆午夜三级精品| gogo大胆日本视频一区| 91精品国产91久久久久久一区二区| 欧美大黄免费观看| 欧美一区二区三区免费| 国产精品理伦片| 奇米四色…亚洲| 色屁屁一区二区| 久久久精品tv| 日韩vs国产vs欧美| 一本大道av一区二区在线播放| 欧美一区二区三区啪啪| 久久亚洲春色中文字幕久久久| 国产欧美一区二区三区鸳鸯浴 | 国产成人免费视频精品含羞草妖精| 91久久精品一区二区| 91精品国产全国免费观看| 欧美激情中文不卡| 精品综合久久久久久8888| 91农村精品一区二区在线| 久久亚洲私人国产精品va媚药| 午夜精品福利一区二区三区av| 久久99国产精品免费| 色噜噜狠狠色综合欧洲selulu| 国产日韩欧美高清在线| 午夜精品久久久久久久99樱桃 | 欧美日韩一区精品| 亚洲欧洲日韩av| 国产精品系列在线播放| 91精品国产一区二区| 亚洲高清视频在线| 一本久久a久久精品亚洲| 精品国产乱码久久久久久免费 | 日本不卡在线视频| 91麻豆精品视频| 国产午夜精品一区二区| 蜜臀av一级做a爰片久久| 欧美性受xxxx黑人xyx性爽| 国产精品午夜久久| 激情都市一区二区| 欧美tickling挠脚心丨vk| 天涯成人国产亚洲精品一区av| 欧美视频中文一区二区三区在线观看| 精品成人a区在线观看| 日本成人在线电影网| 日韩精品中文字幕一区二区三区| 亚洲午夜成aⅴ人片| 欧美三级韩国三级日本三斤 | 天天综合色天天综合色h| 欧美色综合天天久久综合精品| 精品免费国产二区三区| 国产在线看一区| 国产日韩欧美综合一区| 成人高清免费观看| 中文字幕一区二区三区精华液| 91丨porny丨户外露出| 亚洲欧美偷拍另类a∨色屁股| 高清成人在线观看| 国产精品第13页| 国产成人精品三级| 中文字幕一区二区三| 国产一区 二区| 国产精品五月天| 欧美日韩专区在线| 精东粉嫩av免费一区二区三区| 2019国产精品| 韩国女主播成人在线观看| 欧美视频精品在线| 久久91精品国产91久久小草| 国产欧美视频在线观看| av电影在线观看一区| 青娱乐精品视频| 一区二区三国产精华液| 久久久久国色av免费看影院| 欧美精品自拍偷拍| 不卡的av在线| 国产成人午夜精品5599| 日韩黄色小视频| 亚洲精品乱码久久久久久黑人| 精品999久久久| 欧美电影在线免费观看| 91在线观看美女| 成人动漫中文字幕| 国产一区二区三区在线观看免费 | 亚洲精品高清在线| 国产午夜亚洲精品午夜鲁丝片| 91精品久久久久久久91蜜桃| 色综合一区二区| 懂色av一区二区夜夜嗨| 人人精品人人爱| 丝袜美腿高跟呻吟高潮一区| 亚洲天堂免费看| 日韩一区在线播放| 久久久久一区二区三区四区| 91精品国产综合久久精品图片| 欧美亚洲综合色| 欧美揉bbbbb揉bbbbb| 欧美午夜片在线观看| 色综合一个色综合| 色婷婷国产精品| 在线日韩一区二区| 欧美日韩综合在线免费观看| 欧美日韩一区三区| 91精品国产综合久久久久久久久久| 欧美三级日韩在线| 欧美一级理论性理论a| 日韩欧美色综合网站| 精品国免费一区二区三区| 日韩欧美一区二区不卡| 欧美刺激脚交jootjob| 日韩欧美亚洲国产精品字幕久久久 | 色哟哟一区二区| 日本久久精品电影| 欧洲日韩一区二区三区| 欧美亚洲高清一区二区三区不卡| 在线精品视频一区二区| 欧美日韩中文字幕精品| 欧美高清www午色夜在线视频| 8v天堂国产在线一区二区| 精品少妇一区二区三区在线视频| 久久久综合精品| 一区免费观看视频| 五月激情丁香一区二区三区| 蜜臀av一区二区在线免费观看| 国产成人高清在线| eeuss鲁片一区二区三区| 欧美视频中文一区二区三区在线观看| 日韩一区二区免费在线观看| 久久综合九色综合久久久精品综合| 国产精品国产三级国产普通话蜜臀 | 日韩中文字幕91| 日本91福利区| 成人av免费观看| 91精品免费在线| 国产精品网曝门| 图片区小说区国产精品视频| 国产综合久久久久久久久久久久 | 麻豆91在线看| 91丨九色丨蝌蚪富婆spa| 欧美日本在线一区| 国产精品美女久久久久久| 亚洲成人资源网| 国产999精品久久| 日韩一区二区三区电影| 亚洲丝袜精品丝袜在线| 免费在线观看一区| 在线国产亚洲欧美| 久久亚洲综合av| 日韩电影一区二区三区四区| 91亚洲永久精品| 久久久五月婷婷|