public static void instanceOf ( final Object input , Class < ? > classType , final String inputName ) { notNull ( input , "input" ) ; notNull ( classType , "classType" ) ; if ( ! classType . isInstance ( input ) ) { throw new IllegalArgumentException ( "Expecting " + maskNullArgument ( inputName ) + " to an instance of " + classType . getName ( ) + "." ) ; } }
Check that an input of a given class