public void setXsdInput(final String xsdInputPath) {
        if (xsdInputPath == null) {
            throw (new IllegalArgumentException(
                    "You must provide a source folder or file"));
        }
        File xsdInput = new File(xsdInputPath);
        if (xsdInput.exists()) {
            if (xsdInput.isDirectory() && xsdInput.list().length == 0) {
                throw new IllegalArgumentException("Folder '" + xsdInputPath
                        + "' is empty");
            }
        } else {
            throw new IllegalArgumentException("Input file or folder '"
                    + xsdInputPath + "' not found");
        }
        this.xsdInput = xsdInput;
    }
public void setXsdInput ( final String xsdInputPath ) { if ( xsdInputPath == null ) { throw ( new IllegalArgumentException ( "You must provide a source folder or file" ) ) ; } File xsdInput = new File ( xsdInputPath ) ; if ( xsdInput . exists ( ) ) { if ( xsdInput . isDirectory ( ) && xsdInput . list ( ) . length == 0 ) { throw new IllegalArgumentException ( "Folder '" + xsdInputPath + "' is empty" ) ; } } else { throw new IllegalArgumentException ( "Input file or folder '" + xsdInputPath + "' not found" ) ; } this . xsdInput = xsdInput ; }
Check the input parameter and keep it only if it is valid.

@param xsdInputPath a file or folder name (relative or absolute)