All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.buschmais.jqassistant.plugin.common.impl.scanner.DirectoryResourceScannerPlugin Maven / Gradle / Ivy

The newest version!
package com.buschmais.jqassistant.plugin.common.impl.scanner;

import java.io.IOException;

import com.buschmais.jqassistant.core.scanner.api.Scanner;
import com.buschmais.jqassistant.core.scanner.api.Scope;
import com.buschmais.jqassistant.plugin.common.api.model.DirectoryDescriptor;
import com.buschmais.jqassistant.plugin.common.api.scanner.AbstractScannerPlugin;
import com.buschmais.jqassistant.plugin.common.api.scanner.filesystem.DirectoryResource;

public class DirectoryResourceScannerPlugin
        extends AbstractScannerPlugin {

    @Override
    public boolean accepts(DirectoryResource item, String path, Scope scope) throws IOException {
        return true;
    }

    @Override
    public DirectoryDescriptor scan(DirectoryResource item, String path, Scope scope, Scanner scanner) throws IOException {
        DirectoryDescriptor directoryDescriptor = scanner.getContext().getStore().create(DirectoryDescriptor.class);
        directoryDescriptor.setFileName(path);
        return directoryDescriptor;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy