Class DependencyProviderBase

java.lang.Object
org.forgerock.audit.DependencyProviderBase
All Implemented Interfaces:
DependencyProvider

public class DependencyProviderBase extends Object implements DependencyProvider
Base DependencyProvider that has provides no dependencies.
  • Constructor Details

    • DependencyProviderBase

      public DependencyProviderBase()
  • Method Details

    • getDependency

      public <T> T getDependency(Class<T> clazz) throws ClassNotFoundException
      Retrieve the dependency of type T.
      Specified by:
      getDependency in interface DependencyProvider
      Type Parameters:
      T - The type of the dependency class.
      Parameters:
      clazz - the dependency's class
      Returns:
      the dependency
      Throws:
      ClassNotFoundException - if provider does not have a class registered for the requested class type
    • register

      public <T> T register(Class<T> clazz, T obj)
      Register a new provided dependency.
      Type Parameters:
      T - The type of the dependency.
      Parameters:
      clazz - the class to register
      obj - the instance to provide
      Returns:
      the previous values registered for clazz