public static boolean isArrayOfUnboundedTypeVariablesOrObjects ( Type [ ] types ) { for ( Type type : types ) { if ( Object . class . equals ( type ) ) { continue ; } if ( type instanceof TypeVariable < ? > ) { Type [ ] bounds = ( ( TypeVariable < ? > ) type ) . getBounds ( ) ; if ( bounds == null || bounds . length == 0 || ( bounds . length == 1 && Object . class . equals ( bounds [ 0 ] ) ) ) { continue ; } } return false ; } return true ; }
Determines whether the given array only contains unbounded type variables or Object . class .