test/java/fr/jayasoft/ivy/ant/AntCallTriggerTest.java
/**
     * Creates the InputHandler and adds it to the project.
     *
     * @param project the project instance.
     * @param inputHandlerClassname 
     *
     * @exception BuildException if a specified InputHandler
     *                           implementation could not be loaded.
     */
Creates the InputHandler and adds it to the project.

@param project the project instance.

@exception BuildException if a specified InputHandler
implementation could not be loaded.
Creates the InputHandler and adds it to the project . @param project the project instance . @exception BuildException if a specified InputHandler implementation could not be loaded .
private void addInputHandler(Project project, String inputHandlerClassname) throws BuildException {
        InputHandler handler = null;
        if (inputHandlerClassname == null) {
            handler = new DefaultInputHandler();
        } else {
            try {
                handler = (InputHandler)
                    (Class.forName(inputHandlerClassname).newInstance());
                if (project != null) {
                    project.setProjectReference(handler);
                }
            } catch (ClassCastException e) {
                String msg = "The specified input handler class "
                    + inputHandlerClassname
                    + " does not implement the InputHandler interface";
                throw new BuildException(msg);
            } catch (Exception e) {
                String msg = "Unable to instantiate specified input handler "
                    + "class " + inputHandlerClassname + " : "
                    + e.getClass().getName();
                throw new BuildException(msg);
            }
        }
        project.setInputHandler(handler);
    }
private void addInputHandler ( Project project , String inputHandlerClassname ) throws BuildException { InputHandler handler = null ; if ( inputHandlerClassname == null ) { handler = new DefaultInputHandler ( ) ; } else { try { handler = ( InputHandler ) ( Class . forName ( inputHandlerClassname ) . newInstance ( ) ) ; if ( project != null ) { project . setProjectReference ( handler ) ; } } catch ( ClassCastException e ) { String msg = "The specified input handler class " + inputHandlerClassname + " does not implement the InputHandler interface" ; throw new BuildException ( msg ) ; } catch ( Exception e ) { String msg = "Unable to instantiate specified input handler " + "class " + inputHandlerClassname + " : " + e . getClass ( ) . getName ( ) ; throw new BuildException ( msg ) ; } } project . setInputHandler ( handler ) ; }
Creates the InputHandler and adds it to the project.
Creates the InputHandler and adds it to the project .