Class Services


  • public final class Services
    extends Object
    Tools for working with ServiceLoaders.
    Since:
    4.8.0
    • Method Detail

      • service

        @NotNull
        public static <P> @NotNull Optional<P> service​(@NotNull
                                                       @NotNull Class<P> type)
        Locates a service.
        Type Parameters:
        P - the service type
        Parameters:
        type - the service type
        Returns:
        a service, or Optional.empty()
        Since:
        4.8.0