This commit is contained in:
r-ca committed 2024-01-07 19:22:57 +09:00
1 parent 95beda8cc2
commit c54967f016
3 files changed
+20 -1

No files matched your search

@@ -153,7 +153,11 @@ public class ScannerDataManagerStubFragment extends Fragment {
Log.d("ScannerDataManagerStubFragment", "button_init_document_processor clicked");
Toast.makeText(getActivity(), "button_init_document_processor clicked", Toast.LENGTH_LONG).show();
// TODO-rca: ここでDocumentProcessorを初期化する
// DocumentProcessor documentProcessor = documentProcessorFactory.create();
if (this.documentDetail == null) {
Toast.makeText(getActivity(), "documentDetail is null", Toast.LENGTH_LONG).show();
return;
}
DocumentProcessor documentProcessor = documentProcessorFactory.create(this.documentDetail);
});
}
@@ -45,6 +45,9 @@ public class DocumentProcessorImpl implements DocumentProcessor{
@AssistedInject
public DocumentProcessorImpl(@Assisted DocumentDetail documentDetail) {
if (documentDetail == null) {
throw new IllegalArgumentException("documentDetail must not be null");
}
this.documentDetail = documentDetail;
}
@@ -1,4 +1,16 @@
package one.nem.lacerta.processor.module;
import dagger.assisted.Assisted;
import dagger.assisted.AssistedInject;
import one.nem.lacerta.model.document.DocumentDetail;
public class DocumentProcessorModule {
private final DocumentDetail documentDetail;
@AssistedInject
public DocumentProcessorModule(@Assisted DocumentDetail documentDetail) {
this.documentDetail = documentDetail;
}
}