Package net.kyori.adventure.util
Class Services
- java.lang.Object
-
- net.kyori.adventure.util.Services
-
public final class Services extends Object
Tools for working withServiceLoader
s.- Since:
- 4.8.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <P> @NotNull Optional<P>
service(@NotNull Class<P> type)
Locates a service.
-
-
-
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
-
-