Package com.complexible.common.util
Class ClassServiceLoader
- java.lang.Object
-
- com.complexible.common.util.ClassServiceLoader
-
public final class ClassServiceLoader extends java.lang.Object
A simplified version of the ServiceLoader in the JDK. Does not lazy load stuff from the resources file, and it returns classes instead of instances to better jive with Guice.
Cache of loaded values uses soft references and timeouts to response to memory pressures. Likely, the services are only loaded on startup, so keeping the cache read to go for the entire application is wasteful.
- Since:
- 1.2
- Version:
- 4.0.3
- Author:
- Michael Grove
-
-
Constructor Summary
Constructors Constructor Description ClassServiceLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <S> java.lang.Iterable<java.lang.Class<? extends S>>
classesOf(java.lang.Class<S> theClass)
-