Class HK2ToGuiceTypeListenerImpl

java.lang.Object
org.jvnet.hk2.guice.bridge.internal.HK2ToGuiceTypeListenerImpl
All Implemented Interfaces:
com.google.inject.spi.TypeListener

public class HK2ToGuiceTypeListenerImpl extends Object implements com.google.inject.spi.TypeListener
Author:
jwells
  • Constructor Details

    • HK2ToGuiceTypeListenerImpl

      public HK2ToGuiceTypeListenerImpl(org.glassfish.hk2.api.ServiceLocator locator)
      Creates the HK2IntoGuiceBridge TypeLocator that must be bound into the Module with a call to bindListener. The ServiceLocator will be consulted at this time for any types Guice cannot find. If this type is found in the ServiceLocator then that service will be instantiated by hk2
      Parameters:
      locator - The non-null locator that should be used to discover services
  • Method Details

    • hear

      public <I> void hear(com.google.inject.TypeLiteral<I> literal, com.google.inject.spi.TypeEncounter<I> encounter)
      Specified by:
      hear in interface com.google.inject.spi.TypeListener