core/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperationProvider.java
/**
     *
     * @param operationClass
     * @return never returns null
     */
@param operationClass
@return never returns null
@param operationClass @return never returns null
protected final Class<? extends FileOperation> lookupOperation(final Class<? extends FileOperation> operationClass)
            throws FileSystemException
    {
        if (!FileOperation.class.isAssignableFrom(operationClass))
        {
            throw new FileSystemException("vfs.operation/wrong-type.error", operationClass);
        }
        Class<? extends FileOperation> foundClass = null;
        Iterator<Class<? extends FileOperation>> iterator = operations.iterator();
        while (iterator.hasNext())
        {
            Class<? extends FileOperation> operation = iterator.next();
            if (operationClass.isAssignableFrom(operation))
            {
                foundClass = operation;
                break;
            }
        }
        if (foundClass == null)
        {
            throw new FileSystemException("vfs.operation/not-found.error", operationClass);
        }
        return foundClass;
    }
protected final Class < ? extends FileOperation > lookupOperation ( final Class < ? extends FileOperation > operationClass ) throws FileSystemException { if ( ! FileOperation . class . isAssignableFrom ( operationClass ) ) { throw new FileSystemException ( "vfs.operation/wrong-type.error" , operationClass ) ; } Class < ? extends FileOperation > foundClass = null ; Iterator < Class < ? extends FileOperation > > iterator = operations . iterator ( ) ; while ( iterator . hasNext ( ) ) { Class < ? extends FileOperation > operation = iterator . next ( ) ; if ( operationClass . isAssignableFrom ( operation ) ) { foundClass = operation ; break ; } } if ( foundClass == null ) { throw new FileSystemException ( "vfs.operation/not-found.error" , operationClass ) ; } return foundClass ; }
@param operationClass
 @return never returns null
@param operationClass @return never returns null
// check validity of passed class // find appropriate class