public static void isKindOf ( Type parameter , Type typeToMatch , String name ) { if ( ! Types . isKindOf ( parameter , typeToMatch ) ) { throw new IllegalArgumentException ( Strings . format ( "%s is not %s." , name , typeToMatch ) ) ; } }
Test if parameter is of requested type and throw exception if not .