Package com.complexible.common.util

# Class ClassServiceLoader

java.lang.Object
com.complexible.common.util.ClassServiceLoader

public final class ClassServiceLoader extends 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

  Modifier and Type
  Method
  Description
  `static <S> Iterable<Class<? extends S>>`
  `classesOf(Class<S> theClass)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ClassServiceLoader

    public ClassServiceLoader()

- ## Method Details

  - ### classesOf

    public static <S> Iterable<Class<? extends S>> classesOf(Class<S> theClass)