Module org.jvnet.hk2.guice.bridge
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 Summary
ConstructorsConstructorDescriptionHK2ToGuiceTypeListenerImpl(ServiceLocator locator) Creates theHK2IntoGuiceBridgeTypeLocator that must be bound into the Module with a call to bindListener. -
Method Summary
Modifier and TypeMethodDescription<I> voidhear(com.google.inject.TypeLiteral<I> literal, com.google.inject.spi.TypeEncounter<I> encounter)
-
Constructor Details
-
HK2ToGuiceTypeListenerImpl
Creates theHK2IntoGuiceBridgeTypeLocator 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:
hearin interfacecom.google.inject.spi.TypeListener
-