Class ContributionClassLoaderService

java.lang.Object
org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl
ch.tocco.nice2.persist.core.api.hibernate.ContributionClassLoaderService
All Implemented Interfaces:
Serializable, org.hibernate.boot.registry.classloading.spi.ClassLoaderService, org.hibernate.service.Service, org.hibernate.service.spi.Stoppable

public class ContributionClassLoaderService extends org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl
Extended implementation of hibernate's ClassLoaderService which enables adding services at runtime instead of using ServiceLoader.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.hibernate.boot.registry.classloading.spi.ClassLoaderService

    org.hibernate.boot.registry.classloading.spi.ClassLoaderService.Work<T>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <S> void
    addContribution(Class<S> contributionClass, S contribution)
     
    <T> Class<T>
    classForName(String className)
     
    <S> Collection<S>
    loadJavaServices(Class<S> serviceContract)
     

    Methods inherited from class org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl

    fromConfigSettings, generateProxy, locateResource, locateResources, locateResourceStream, packageForNameOrNull, stop, workWithClassLoader

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ContributionClassLoaderService

      public ContributionClassLoaderService()
  • Method Details

    • addContribution

      public <S> void addContribution(Class<S> contributionClass, S contribution)
    • loadJavaServices

      public <S> Collection<S> loadJavaServices(Class<S> serviceContract)
      Specified by:
      loadJavaServices in interface org.hibernate.boot.registry.classloading.spi.ClassLoaderService
      Overrides:
      loadJavaServices in class org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl
    • classForName

      public <T> Class<T> classForName(String className)
      Specified by:
      classForName in interface org.hibernate.boot.registry.classloading.spi.ClassLoaderService
      Overrides:
      classForName in class org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl