Package io.micronaut.core.io.service
Class MicronautMetaServiceLoaderUtils
java.lang.Object
io.micronaut.core.io.service.MicronautMetaServiceLoaderUtils
The loader of Micronaut services under META-INF/micronaut/.
- Since:
- 4.7
- Author:
- Denis Stepanov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindAllMicronautMetaServices
(@NonNull ClassLoader classLoader) Find all Micronaut services.findMetaMicronautServiceEntries
(@NonNull ClassLoader classLoader, @NonNull Class<S> serviceClass, @Nullable Predicate<S> predicate) Find all instantiated Micronaut service entries.findMicronautMetaServiceEntries
(@NonNull ClassLoader classLoader, @NonNull String serviceName) Find Micronaut service entries.
-
Constructor Details
-
MicronautMetaServiceLoaderUtils
public MicronautMetaServiceLoaderUtils()
-
-
Method Details
-
findMetaMicronautServiceEntries
@NonNull public static <S> @NonNull List<S> findMetaMicronautServiceEntries(@NonNull @NonNull ClassLoader classLoader, @NonNull @NonNull Class<S> serviceClass, @Nullable @Nullable Predicate<S> predicate) Find all instantiated Micronaut service entries.- Type Parameters:
S
- The service type- Parameters:
classLoader
- The classloaderserviceClass
- The service classpredicate
- The predicate- Returns:
- the result
-
findMicronautMetaServiceEntries
@NonNull public static @NonNull Set<String> findMicronautMetaServiceEntries(@NonNull @NonNull ClassLoader classLoader, @NonNull @NonNull String serviceName) throws IOException Find Micronaut service entries.- Parameters:
classLoader
- The classloaderserviceName
- The service name- Returns:
- The entries
- Throws:
IOException
-
findAllMicronautMetaServices
@NonNull public static @NonNull Map<String,Set<String>> findAllMicronautMetaServices(@NonNull @NonNull ClassLoader classLoader) throws IOException Find all Micronaut services.- Parameters:
classLoader
- The classloader- Returns:
- the all entries
- Throws:
IOException
-