This can be done by creating a Guice module class and adding a corresponding entry in the MODULE table. A Guice module class is created by deriving a class from com.google.guice.AbstractModule and overriding the configure method to add the following statement:
MapBinder<String, Method> evidence2CompareMapBinder = MapBinder.newMapBinder(binder(), String.class, Method.class, new RegistrarImpl(RegistrarType.EVIDENCE_TO_COMPARE)); evidence2CompareMapBinder.addBinding(CASEEVIDENCE.SAMPLEADDRESS) .toInstance(SampleAddressFactory.class.getMethod( ReflectionConst.kNewInstance, new Class[0]));
Where 'RegistrarType.EVIDENCE_TO_COMPARE' is an annotation which is used to differentiate between various registrar maps.
It is not necessary to create a new module for each of such hooks you have to bind. Single module class per component will work well.