public static < E > E checkNotInstanceOf ( Class type , E object , String errorMessage ) { isNotNull ( type , "type" ) ; if ( type . isInstance ( object ) ) { throw new IllegalArgumentException ( errorMessage ) ; } return object ; }
Tests the supplied object to see if it is not a type of the supplied class .