Class DefaultInstanceProvider

java.lang.Object
com.soklet.core.impl.DefaultInstanceProvider
All Implemented Interfaces:
InstanceProvider

Author:
Mark Allen
  • Constructor Details

  • Method Details

    • sharedInstance

    • provide

      @Nonnull public <T> T provide(@Nonnull Class<T> instanceClass)
      Description copied from interface: InstanceProvider
      Vends an instance of the given class.

      The instance does not necessarily have to be new for every invocation (for example, implementors might return cached instances).

      Specified by:
      provide in interface InstanceProvider
      Type Parameters:
      T - the type of class to instantiate
      Parameters:
      instanceClass - type token which represents the class to instantiate
      Returns:
      an instance of T