Code example for ServiceLoader

Methods: iterator

0
public class ServerSerializerFactory { 
 
    private static ServiceLoader<ServerSerializer> loader = ServiceLoader.load(ServerSerializer.class);
 
    public static Iterator<ServerSerializer> getSerializers() {
        return loader.iterator();
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java