mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 07:53:15 +00:00
Injectできるように
This commit is contained in:
parent
73f553cff3
commit
ca153f5602
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user