Look at the class Modules. There is a method "override"

Usage:
Modules.override(new WriterModule()).with(new AbcWriterModule())



On 29.01.19 12:21, Sammy wrote:
Hi,
I got below final module

public final class WriterModuleextends AbstractModule {
with below provides
@ProvidesIntoOptional(Type.DEFAULT)
public TopicNameFactory provideDefaultTopicNameFactory() {
     return new TopicNameFactory.Default();
}
This is from in-house library which can't be changed without affecting/testing 
many other application.
How do I override this TopicNameFactory to custom ABCTopicNameFactory.
--
You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/f1263a43-e3dc-4be6-bff7-d50d50f54d70%40googlegroups.com <https://groups.google.com/d/msgid/google-guice/f1263a43-e3dc-4be6-bff7-d50d50f54d70%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-guice/ae5ba44d-102d-ee02-ef44-f6e964f6f575%40gmx.ch.
For more options, visit https://groups.google.com/d/optout.

Reply via email to