Package com.complexible.common.util
Class ServiceLoaders
- java.lang.Object
-
- com.complexible.common.util.ServiceLoaders
-
public final class ServiceLoaders extends java.lang.ObjectWrapper around the Java ServiceLoader class which returns collections of instances of an interface as opposed to iterators over instances that the normal ServiceLoader returns.
- Since:
- 0.4.5
- Version:
- 4.0.3
- Author:
- Michael Grove
- See Also:
ClassServiceLoader
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.util.Collection<java.lang.Class<? extends T>>classesOf(java.lang.Class<T> theClass)Return the class objects for all classes which extend from the specified classstatic <T> java.util.Collection<T>instancesOf(java.lang.Class<T> theClass)Return instances of all the classes which extend from the specified class
-
-
-
Method Detail
-
instancesOf
public static <T> java.util.Collection<T> instancesOf(java.lang.Class<T> theClass)
Return instances of all the classes which extend from the specified class- Type Parameters:
T- the type- Parameters:
theClass- the parent interface/abstract class- Returns:
- a collection of new instances (created using the default constructor)
-
classesOf
public static <T> java.util.Collection<java.lang.Class<? extends T>> classesOf(java.lang.Class<T> theClass)
Return the class objects for all classes which extend from the specified class- Type Parameters:
T- the type- Parameters:
theClass- the parent interface/abstract class- Returns:
- a collection of class objects for concrete implementations of the provided class.
-
-