mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
Factory作成
This commit is contained in:
parent
d453c0705f
commit
4fd490ee12
|
@ -1,4 +1,10 @@
|
||||||
package one.nem.lacerta.processor.factory;
|
package one.nem.lacerta.processor.factory;
|
||||||
|
|
||||||
public class DocumentProcessorFactory {
|
import dagger.assisted.AssistedFactory;
|
||||||
|
import one.nem.lacerta.model.document.DocumentDetail;
|
||||||
|
import one.nem.lacerta.processor.impl.DocumentProcessorImpl;
|
||||||
|
|
||||||
|
@AssistedFactory
|
||||||
|
public interface DocumentProcessorFactory {
|
||||||
|
DocumentProcessorImpl create(DocumentDetail documentDetail);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@ import java.util.UUID;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import dagger.assisted.Assisted;
|
||||||
|
import dagger.assisted.AssistedInject;
|
||||||
import one.nem.lacerta.processor.DocumentProcessor;
|
import one.nem.lacerta.processor.DocumentProcessor;
|
||||||
|
|
||||||
import one.nem.lacerta.model.document.DocumentDetail;
|
import one.nem.lacerta.model.document.DocumentDetail;
|
||||||
|
@ -41,6 +43,11 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
||||||
@Inject
|
@Inject
|
||||||
XmlMetaParser xmlMetaParser;
|
XmlMetaParser xmlMetaParser;
|
||||||
|
|
||||||
|
@AssistedInject
|
||||||
|
public DocumentProcessorImpl(@Assisted DocumentDetail documentDetail) {
|
||||||
|
this.documentDetail = documentDetail;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
logger.debug("init", "called");
|
logger.debug("init", "called");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user