diff --git a/utils/src/main/java/one/nem/lacerta/utils/impl/XmlMetaParserImpl.java b/utils/src/main/java/one/nem/lacerta/utils/impl/XmlMetaParserImpl.java index 368ea78b..890d2ca0 100644 --- a/utils/src/main/java/one/nem/lacerta/utils/impl/XmlMetaParserImpl.java +++ b/utils/src/main/java/one/nem/lacerta/utils/impl/XmlMetaParserImpl.java @@ -8,6 +8,7 @@ import java.io.StringReader; import java.nio.file.Path; import java.util.ArrayList; +import javax.inject.Inject; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -16,6 +17,11 @@ import one.nem.lacerta.model.document.internal.XmlMetaPageModel; import one.nem.lacerta.utils.XmlMetaParser; public class XmlMetaParserImpl implements XmlMetaParser{ + + @Inject + public XmlMetaParserImpl() { + } + @Override public XmlMetaModel parse(String xml) { try { diff --git a/utils/src/main/java/one/nem/lacerta/utils/module/XmlMetaParserModule.java b/utils/src/main/java/one/nem/lacerta/utils/module/XmlMetaParserModule.java new file mode 100644 index 00000000..8e2f61f2 --- /dev/null +++ b/utils/src/main/java/one/nem/lacerta/utils/module/XmlMetaParserModule.java @@ -0,0 +1,17 @@ +package one.nem.lacerta.utils.module; + + +import dagger.Binds; +import dagger.Module; +import dagger.hilt.InstallIn; +import dagger.hilt.components.SingletonComponent; + +import one.nem.lacerta.utils.XmlMetaParser; +import one.nem.lacerta.utils.impl.XmlMetaParserImpl; +@Module +@InstallIn(SingletonComponent.class) +abstract public class XmlMetaParserModule { + + @Binds + public abstract XmlMetaParser bindXmlMetaParser(XmlMetaParserImpl impl); +}