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

net.fortuna.ical4j.data.ServiceLoaderPropertyFactorySupplier Maven / Gradle / Ivy

There is a newer version: 3.0.22
Show newest version
package net.fortuna.ical4j.data;

import net.fortuna.ical4j.model.PropertyFactory;

import java.util.ArrayList;
import java.util.List;
import java.util.ServiceLoader;
import java.util.function.Supplier;

public class ServiceLoaderPropertyFactorySupplier implements Supplier>> {

    @Override
    public List> get() {
        final ServiceLoader serviceLoader = ServiceLoader.load(PropertyFactory.class,
                PropertyFactory.class.getClassLoader());

        List> factories = new ArrayList<>();
        serviceLoader.forEach(factories::add);
        return factories;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy