Class LoaderService


  • public class LoaderService
    extends java.lang.Object
    Factory and utility methods for working with Loaders.
    • Field Detail

      • ACCEPT_ALL

        public static java.util.function.Predicate<Loader> ACCEPT_ALL
    • Constructor Detail

      • LoaderService

        public LoaderService()
    • Method Detail

      • getSupportedLoadSpecs

        public static java.util.Map<Loader,​java.util.Collection<LoadSpec>> getSupportedLoadSpecs​(ByteProvider provider,
                                                                                                       java.util.function.Predicate<Loader> loaderFilter)
        Gets all supported LoadSpecs for loading the given ByteProvider.
        Parameters:
        provider - The ByteProvider to load.
        loaderFilter - A Predicate that will filter out undesired Loaders.
        Returns:
        A Map of Loaders to their respective LoadSpecs. It is safe to assume that every Loader in the Map will have at least one LoadSpec.
      • getAllLoaderNames

        public static java.util.Collection<java.lang.String> getAllLoaderNames()
        Gets all known Loaders' names.
        Returns:
        All known Loaders' names.
      • getLoaderClassByName

        public static java.lang.Class<? extends Loader> getLoaderClassByName​(java.lang.String name)
        Gets the Loader Class that corresponds to the given simple Class name.
        Parameters:
        name - The name of the Loader to get the Class of.
        Returns:
        The Loader Class that corresponds to the given simple Class name.