public static String [ ] getCanonicalParameterTypes ( Method viewMethod ) { Class < ? > [ ] parameterTypes = viewMethod . getParameterTypes ( ) ; if ( parameterTypes == null ) { return NO_STRINGS ; } String [ ] canonicalNames = new String [ parameterTypes . length ] ; for ( int i = 0 ; i < parameterTypes . length ; i ++ ) { canonicalNames [ i ] = parameterTypes [ i ] . getCanonicalName ( ) ; } return canonicalNames ; }
This method returns the class names of the parameters of the given method in canonical form . In case of a method without parameters it will return an empty array .