private static Type[] unrollBounds(final Map<TypeVariable<?>,Type> typeArguments,final Type[] bounds){
  Type[] result=bounds;
  int i=0;
  for (; i < result.length; i++) {
    final Type unrolled=unrollVariables(typeArguments,result[i]);
    if (unrolled == null) {
      result=ArrayUtils.remove(result,i--);
    }
 else {
      result[i]=unrolled;
    }
  }
  return result;
}

private static Type [ ] unrollBounds ( final Map < TypeVariable < ? > , Type > typeArguments , final Type [ ] bounds ) { Type [ ] result = bounds ; int i = 0 ; for ( ; i < result . length ; i ++ ) { final Type unrolled = unrollVariables ( typeArguments , result [ i ] ) ; if ( unrolled == null ) { result = ArrayUtils . remove ( result , i -- ) ; } else { result [ i ] = unrolled ; } } return result ; }
local helper method to unroll variables in a type bounds array .
