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

org.meridor.stecker.dev.DevPluginsProvider Maven / Gradle / Ivy

Go to download

This is a plugin loading library. Its main purpose is to load extension point implementations from provided plugins.

There is a newer version: 1.0.2
Show newest version
package org.meridor.stecker.dev;

import org.meridor.stecker.PluginException;
import org.meridor.stecker.interfaces.PluginsProvider;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.stream.Collectors;

public class DevPluginsProvider implements PluginsProvider {

    @Override
    public List provide(Path baseDirectory) throws PluginException {
        try {
            return Files.list(baseDirectory)
                    .filter(f -> Files.isDirectory(f) && f.toString().endsWith("plugin"))
                    .collect(Collectors.toList());
        } catch (IOException e) {
            throw new PluginException(e);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy