处理类型是数组类型
<p>Function: createValueArray</p>
<p>Description: </p>
@author acexy@thankjava.com
@date 2015-1-27 下午4:30:29
@version 1.0
@param targetFieldType
@param targetObject
@param originValue
@return
359365
static Object createValueArray(Field targetField,Class<?> targetFieldType,Object targetObject,Object originValue){
		if(originValue == null){
			return null;
		}
		//获取数组实际容纳的的类型
		Class<?> proxyType = targetFieldType.getComponentType();
		Object[] originArray = (Object[]) originValue;
		if(originArray.length == 0){
			return null;
		}
		Object[] targetArray = (Object[]) Array.newInstance(proxyType, originArray.length);
		for (int i = 0 ; i < originArray.length ; i ++) {
			targetArray[i] = ValueCast.createValueCore(targetField,proxyType,targetObject,originArray[i]);
		}
		return targetArray;
	}
1177630
public static void setFieldValue(Object instanceContainingField, String fieldName, Object fieldValue)
    {
        // Find the class containing the field to set
        Class<?> targetClass = instanceContainingField.getClass();
        while (targetClass != null) {
            for (Field field : targetClass.getDeclaredFields()) {
                if (field.getName().equalsIgnoreCase(fieldName)) {
                    try {
                        boolean isAccessible = field.isAccessible();
                        try {
                            field.setAccessible(true);
                            field.set(instanceContainingField, fieldValue);
                        } finally {
                            field.setAccessible(isAccessible);
                        }
                    } catch (Exception e) {
                        // This shouldn't happen but if it does then the Component manager will not function properly
                        // and we need to abort. It probably means the Java security manager has been configured to
                        // prevent accessing private fields.
                        throw new RuntimeException("Failed to set field [" + fieldName + "] in instance of ["
                            + instanceContainingField.getClass().getName() + "]. The Java Security Manager has "
                            + "probably been configured to prevent settting private field values. XWiki requires "
                            + "this ability to work.", e);
                    }
                    return;
                }
            }
            targetClass = targetClass.getSuperclass();
        }
    }
121595
function baseIsTypedArray$1(value) {
    return isObjectLike$3(value) && isLength(value.length) && !!typedArrayTags[baseGetTag$3(value)];
}
1304799
private static <OriginObject, TargetObject> TargetObject setValue(OriginObject originObject, TargetObject targetObject, Class<TargetObject> targetClass) {

        Field[] targetFields = ReflectUtil.getFieldArrayIncludeSupClassExcludeUID(targetClass);

        Field originField = null; //目标字段类型

        Object originValue = null; //原始对象属性值
        Object targetValue = null; //目标对象属性值

        //从目标对象中找原始对象的属性方式，
        for (Field targetField : targetFields) {

            originField = ReflectUtil.getField(originObject.getClass(), targetField.getName());

            if (originField == null) { //目标对象有，但是原始对象中没有
                continue;
            }

            if (Modifier.isStatic(originField.getModifiers())) {
                continue;
            }

            targetField.setAccessible(true);
            originField.setAccessible(true);

            originValue = ReflectUtil.getFieldVal(originObject, targetField.getName());
            if (originValue == null) { //从原始对象中获取的字段属性为null
                continue;
            }

            targetValue = ValueCast.cast(targetField, targetObject, originValue);

            if (targetValue != null) {
                try {
                    targetField.set(targetObject, targetValue);
                } catch (IllegalArgumentException e) {
                    e.printStackTrace();
                } catch (IllegalAccessException e) {//为目标属性赋值失败
                    e.printStackTrace();
                }
            }
        }

        return targetObject;
    }
671523
@SuppressWarnings({ "unchecked", "rawtypes" })
	static Object createValueEnum(Field targetField,Class<?> targetFieldType,Object targetObject,Object originValue){
		if(originValue == null){
			return null;
		}
		Object enumNameObj = ReflectUtil.getFieldVal(originValue,"name");//获取枚举中的name属性
		if(enumNameObj == null){
			return null;
		}
		String enumName = (String)enumNameObj;
		return Enum.valueOf((Class<Enum>)targetFieldType,enumName);//得到目标枚举对象
	}
1243618
public String createFormulaValue(final Configuration config, final Cell cell, final Object targetBean) {
        
        if(formula.isPresent()) {
            final Map<String, Object> vars = new HashMap<>();
            vars.put("rowIndex", cell.getRowIndex());
            vars.put("columnIndex", cell.getColumnIndex());
            vars.put("rowNumber", cell.getRowIndex()+1);
            vars.put("columnNumber", cell.getColumnIndex()+1);
            vars.put("columnAlpha", CellReference.convertNumToColString(cell.getColumnIndex()));
            vars.put("address", CellPosition.of(cell).formatAsString());
            vars.put("targetBean", targetBean);
            vars.put("cell", cell);
            
            return config.getFormulaFormatter().interpolate(formula.get(), vars);
            
        } else {
            
            // メソッドの引数の組み立て
            final Class<?>[] paramTypes = method.get().getParameterTypes();
            final Object[] paramValues = new Object[paramTypes.length];
            
            for(int i=0; i < paramTypes.length; i++) {
                if(Cell.class.isAssignableFrom(paramTypes[i])) {
                    paramValues[i] = cell;
                    
                } else if(CellPosition.class.isAssignableFrom(paramTypes[i])) {
                    paramValues[i] = CellPosition.of(cell);
                    
                } else if(Point.class.isAssignableFrom(paramTypes[i])) {
                    paramValues[i] = CellPosition.of(cell).toPoint();
                    
                } else if(org.apache.poi.ss.util.CellAddress.class.isAssignableFrom(paramTypes[i])) {
                    paramValues[i] = CellPosition.of(cell).toCellAddress();
                    
                } else if(Sheet.class.isAssignableFrom(paramTypes[i])) {
                    paramValues[i] = cell.getSheet();
                    
                } else if(Configuration.class.isAssignableFrom(paramTypes[i])) {
                    paramValues[i] = config;
                    
                } else {
                    paramValues[i] = null;
                }
            }
            
            try {
                return (String) method.get().invoke(targetBean, paramValues);
                
            } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
                final Class<?> targetClass = targetBean.getClass();
                final Throwable t = e.getCause() == null ? e : e.getCause();
                throw new XlsMapperException(
                        String.format("Fail execute method '%s#%s'.", targetClass.getName(), method.get().getName()),
                        t);
            }
            
        }
        
    }
951660
@SuppressWarnings("unchecked")
  public static <T> T getFieldValue(Object object, String fieldName) {
    Field field = CACHE.getUnchecked(object.getClass().getName() + '#' + fieldName);
    if (field == null) {
      throw new IllegalArgumentException("Could not find field [" + fieldName + "] on target [" + object + "]");
    }

    Object result = null;
    try {
      result = field.get(object);
    } catch (IllegalAccessException ignored) {
    }
    return (T) result;
  }
205580
public BeanBox injectValue(String fieldName, Object constValue) {
		checkOrCreateFieldInjects();
		Field f = ReflectionUtils.findField(beanClass, fieldName);
		BeanBox inject = new BeanBox();
		inject.setTarget(constValue);
		inject.setType(f.getType());
		inject.setPureValue(true);
		ReflectionUtils.makeAccessible(f);
		this.getFieldInjects().put(f, inject);
		return this;
	}
585225
@XmlElementDecl(namespace = "urn:oasis:names:tc:xacml:3.0:core:schema:wd-17", name = "Target")
    public JAXBElement<TargetType> createTarget(TargetType value) {
        return new JAXBElement<TargetType>(_Target_QNAME, TargetType.class, null, value);
    }
1292763
@SuppressWarnings("unchecked")
	public <T> T convert(Type type, Object value, T defaultValue, boolean isCustomFirst) throws ConvertException {
		if (TypeUtil.isUnknow(type) && null == defaultValue) {
			// 对于用户不指定目标类型的情况，返回原值
			return (T) value;
		}
		if (ObjectUtil.isNull(value)) {
			return defaultValue;
		}
		if (TypeUtil.isUnknow(type)) {
			type = defaultValue.getClass();
		}
		
		// 标准转换器
		final Converter<T> converter = getConverter(type, isCustomFirst);
		if (null != converter) {
			return converter.convert(value, defaultValue);
		}

		Class<T> rowType = (Class<T>) TypeUtil.getClass(type);
		if (null == rowType) {
			if (null != defaultValue) {
				rowType = (Class<T>) defaultValue.getClass();
			} else {
				// 无法识别的泛型类型，按照Object处理
				return (T) value;
			}
		}
		
		// 特殊类型转换，包括Collection、Map、强转、Array等
		final T result = convertSpecial(type, rowType, value, defaultValue);
		if (null != result) {
			return result;
		}
		
		// 尝试转Bean
		if (BeanUtil.isBean(rowType)) {
			return new BeanConverter<T>(type).convert(value, defaultValue);
		}
		
		// 无法转换
		throw new ConvertException("No Converter for type [{}]", rowType.getName());
	}
609393
public static void setFieldValue(final Object obj, final String fieldName, final Object value) {
		Field field = getAccessibleField(obj, fieldName);

		if (field == null) {
			throw new IllegalArgumentException("Could not find field [" + fieldName + "] on target [" + obj + "]");
		}

		try {
			field.set(obj, value);
		} catch (IllegalAccessException e) {
			logger.error("不可能抛出的异常:{}", e.getMessage());
		}
	}
989838
public boolean isObjectsFieldValueDefault(Object object) throws SQLException {
		Object fieldValue = extractJavaFieldValue(object);
		return isFieldValueDefault(fieldValue);
	}
1229166
public static void set(Object target, Field field, String fieldVal)
    {
        PropertyAccessor<?> accessor = PropertyAccessorFactory.getPropertyAccessor(field);
        Object value = accessor.fromString(target.getClass(), fieldVal);
        set(target, field, value);
    }
1062339
public Client createWithValues(Object... varValues) {
        serviceFactory.setBus(getBus());
        checkResources(false);
        ClassResourceInfo cri = null;
        try {
            Endpoint ep = createEndpoint();
            if (getServiceClass() != null) {
                for (ClassResourceInfo info : serviceFactory.getClassResourceInfo()) {
                    if (info.getServiceClass().isAssignableFrom(getServiceClass())
                        || getServiceClass().isAssignableFrom(info.getServiceClass())) {
                        cri = info;
                        break;
                    }
                }
                if (cri == null) {
                    // can not happen in the reality
                    throw new RuntimeException("Service class " + getServiceClass().getName()
                                               + " is not recognized");
                }
            } else {
                cri = serviceFactory.getClassResourceInfo().get(0);
            }

            boolean isRoot = cri.getURITemplate() != null;
            ClientProxyImpl proxyImpl = null;
            ClientState actualState = getActualState();
            proxyImpl = createClientProxy(cri, isRoot, actualState, varValues);
            initClient(proxyImpl, ep, actualState == null);

            final Class<?> serviceClass = cri.getServiceClass();
            ClassLoader theLoader = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {

                @Override
                public ClassLoader run() {
                    return proxyLoader == null ? serviceClass.getClassLoader() : proxyLoader;
                }
            });
            Class<?>[] ifaces = new Class[]{Client.class, InvocationHandlerAware.class, cri.getServiceClass()};
            Client actualClient = (Client)ProxyHelper.getProxy(theLoader, ifaces, proxyImpl);
            proxyImpl.setProxyClient(actualClient);
            notifyLifecycleManager(actualClient);
            this.getServiceFactory().sendEvent(FactoryBeanListener.Event.CLIENT_CREATED, actualClient, ep);
            return actualClient;
        } catch (IllegalArgumentException ex) {
            String message = ex.getLocalizedMessage();
            if (cri != null) {
                String expected = cri.getServiceClass().getSimpleName();
                if ((expected + " is not an interface").equals(message)) {
                    message += "; make sure CGLIB is on the classpath";
                }
            }
            LOG.severe(ex.getClass().getName() + " : " + message);
            throw ex;
        } catch (Exception ex) {
            LOG.severe(ex.getClass().getName() + " : " + ex.getLocalizedMessage());
            throw new RuntimeException(ex);
        }

    }
134940
@VisibleForTesting
  static TypedValue createTypedValue(Value value) {
    return value.match(
        typedValueDoubleFunction,
        typedValueLongFunction,
        typedValueDistributionFunction,
        typedValueSummaryFunction,
        Functions.<TypedValue>throwIllegalArgumentException());
  }
784294
public static <OriginObject, TargetObject> TargetObject copy(OriginObject originObject, Class<TargetObject> targetClass) {

        if (originObject == null) {
            return null;
        }

        //参数不合法异常
        if (targetClass == null) {
            throw new IllegalArgumentException("targetClass can't be null");
        }

        //目标返回对象
        TargetObject targetObject = null;

        try {
            targetObject = targetClass.newInstance();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }

        return setValue(originObject, targetObject, targetClass);
    }
816354
public static Object setSilent(Object target, String fieldName, Object value) {
		Class<?> targetClass = target.getClass();
		try {
			Field field = targetClass.getDeclaredField(fieldName);
			field.setAccessible(true);
			field.set(target, box(value, field.getType()));
			return target;
		} catch (Exception e) {
			return target;
		}
	}