mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
Factory作成
This commit is contained in:
2 files changed
+14
-1
No files matched your search
+7
-1
@@ -1,4 +1,10 @@
|
||||
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 dagger.assisted.Assisted;
|
||||
import dagger.assisted.AssistedInject;
|
||||
import one.nem.lacerta.processor.DocumentProcessor;
|
||||
|
||||
import one.nem.lacerta.model.document.DocumentDetail;
|
||||
@@ -41,6 +43,11 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
||||
@Inject
|
||||
XmlMetaParser xmlMetaParser;
|
||||
|
||||
@AssistedInject
|
||||
public DocumentProcessorImpl(@Assisted DocumentDetail documentDetail) {
|
||||
this.documentDetail = documentDetail;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
logger.debug("init", "called");
|
||||
|
||||
Reference in new issue
Block a user