public class ServiceLoaderUtils extends Object
Constructor and Description |
---|
ServiceLoaderUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
newInstance(String className)
Loads a class and instantiates it
|
static <T> T |
newInstance(String className,
ClassLoader loader)
Loads a class and instantiates it
|
static <T> void |
sortLoadedClasses(List<T> loaded)
Sorts a list of loaded classes, so that non-Tika ones come
before Tika ones, and otherwise in reverse alphabetical order
|
public static <T> void sortLoadedClasses(List<T> loaded)
public static <T> T newInstance(String className)
T
- service typeclassName
- service class namepublic static <T> T newInstance(String className, ClassLoader loader)
T
- service typeclassName
- service class nameloader
- class loaderCopyright © 2007–2022 The Apache Software Foundation. All rights reserved.