-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implemented injector class #709
base: main
Are you sure you want to change the base?
Conversation
public class Injector { | ||
private static final Injector injector = new Injector(); | ||
|
||
private final Map<Class<?>, Object> instances = new HashMap<>(); | ||
private final Map<Class<?>, Class<?>> interfaceImplementations = Map.of( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In common mistakes was a requirement
Make Interface Implementations map a class field.
I think, we need set static
type for this map.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, some detail need to fix
import mate.academy.service.impl.FileReaderServiceImpl; | ||
import mate.academy.service.impl.ProductParserImpl; | ||
import mate.academy.service.impl.ProductServiceImpl; | ||
|
||
public class Injector { | ||
private static final Injector injector = new Injector(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.