Impl, Factory修正

This commit is contained in:
ろむねこ 2023-12-21 16:53:17 +09:00
parent 2aa6bf8c5b
commit 0d42dc3461
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168
2 changed files with 8 additions and 5 deletions

View File

@ -3,9 +3,9 @@ package one.nem.lacerta.source.file.factory;
import java.nio.file.Path; import java.nio.file.Path;
import dagger.assisted.AssistedFactory; import dagger.assisted.AssistedFactory;
import one.nem.lacerta.source.file.FileManager; import one.nem.lacerta.source.file.impl.FileManagerImpl;
@AssistedFactory @AssistedFactory
public interface FileManagerFactory { public interface FileManagerFactory {
FileManager create(Path rootDir); FileManagerImpl create(Path rootDir);
} }

View File

@ -12,6 +12,8 @@ import java.util.List;
import javax.inject.Inject; import javax.inject.Inject;
import dagger.assisted.Assisted;
import dagger.assisted.AssistedInject;
import one.nem.lacerta.source.file.FileManager; import one.nem.lacerta.source.file.FileManager;
public class FileManagerImpl implements FileManager { public class FileManagerImpl implements FileManager {
@ -32,9 +34,10 @@ public class FileManagerImpl implements FileManager {
} }
} }
@Inject @AssistedInject
public FileManagerImpl(Path rootDir) { public FileManagerImpl(@Assisted Path rootDir) {
// TODO-rca: 未実装 this.rootDir = rootDir;
this.currentDir = rootDir;
} }
@Override @Override