From 0d42dc3461f51c15b3b586e97f51f7222ed894cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 21 Dec 2023 16:53:17 +0900 Subject: [PATCH] =?UTF-8?q?Impl,=20Factory=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/source/file/factory/FileManagerFactory.java | 4 ++-- .../nem/lacerta/source/file/impl/FileManagerImpl.java | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/source/src/main/java/one/nem/lacerta/source/file/factory/FileManagerFactory.java b/source/src/main/java/one/nem/lacerta/source/file/factory/FileManagerFactory.java index c4617e85..e5272020 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/factory/FileManagerFactory.java +++ b/source/src/main/java/one/nem/lacerta/source/file/factory/FileManagerFactory.java @@ -3,9 +3,9 @@ package one.nem.lacerta.source.file.factory; import java.nio.file.Path; import dagger.assisted.AssistedFactory; -import one.nem.lacerta.source.file.FileManager; +import one.nem.lacerta.source.file.impl.FileManagerImpl; @AssistedFactory public interface FileManagerFactory { - FileManager create(Path rootDir); + FileManagerImpl create(Path rootDir); } diff --git a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java index 653cf1dc..f8c77012 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java +++ b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java @@ -12,6 +12,8 @@ import java.util.List; import javax.inject.Inject; +import dagger.assisted.Assisted; +import dagger.assisted.AssistedInject; import one.nem.lacerta.source.file.FileManager; public class FileManagerImpl implements FileManager { @@ -32,9 +34,10 @@ public class FileManagerImpl implements FileManager { } } - @Inject - public FileManagerImpl(Path rootDir) { - // TODO-rca: 未実装 + @AssistedInject + public FileManagerImpl(@Assisted Path rootDir) { + this.rootDir = rootDir; + this.currentDir = rootDir; } @Override