private static void bindList(Class<?> itemType,Object target,Field field,ParameterAccess parameters){
  String fieldName=field.getName();
  Class<?> fieldType=field.getType();
  List<ParameterAccess> itemParameters=createItemParameters(itemType,parameters);
  Object array=Array.newInstance(itemType,itemParameters.size());
  for (int i=0; i < itemParameters.size(); i++) {
    Object itemValue=createAndBindItem(itemParameters.get(i),itemType);
    Array.set(array,i,itemValue);
  }
  Object targetValue=convertArray(array,fieldType,itemType);
  try {
    field.setAccessible(true);
    field.set(target,targetValue);
  }
 catch (  Exception e) {
    String message=String.format("Error binding list to field '%s'",fieldName);
    throw new BindingException(message,e);
  }
}

private static void bindList ( Class < ? > itemType , Object target , Field field , ParameterAccess parameters ) { String fieldName = field . getName ( ) ; Class < ? > fieldType = field . getType ( ) ; List < ParameterAccess > itemParameters = createItemParameters ( itemType , parameters ) ; Object array = Array . newInstance ( itemType , itemParameters . size ( ) ) ; for ( int i = 0 ; i < itemParameters . size ( ) ; i ++ ) { Object itemValue = createAndBindItem ( itemParameters . get ( i ) , itemType ) ; Array . set ( array , i , itemValue ) ; } Object targetValue = convertArray ( array , fieldType , itemType ) ; try { field . setAccessible ( true ) ; field . set ( target , targetValue ) ; } catch ( Exception e ) { String message = String . format ( "Error binding list to field '%s'" , fieldName ) ; throw new BindingException ( message , e ) ; } }
binds a list value into the given field .
