public static Class [ ] getTypes ( Object ... args ) { if ( args . length == 0 ) { return new Class [ 0 ] ; } Class [ ] types = new Class [ args . length ] ; for ( int i = 0 ; i < args . length ; i ++ ) { types [ i ] = args [ i ] == null ? Object . class : args [ i ] . getClass ( ) ; } return types ; }
Gets the types for an array of objects