Package org.iworkz.genesis
Interface Injector
- All Known Implementing Classes:
AbstractInjector,DefaultInjector
public interface Injector
Builds the graphs of objects. The injector tracks the dependencies
for each type and uses bindings to inject them.
-
Method Summary
Modifier and TypeMethodDescription<T> Class<? extends T>getImplementationClass(Class<T> typ) Returns the implementation class for the giventype<T> Class<? extends T>getImplementationClass(String className) Returns the implementation class for the given name<T> TgetInstance(Class<T> type) Returns the appropriate instance for the giventype<T> TgetInstance(String className) Returns the appropriate instance for the given namevoidinjectMembers(Object instance) Injects dependencies into the fields and methods ofinstance.
-
Method Details
-
injectMembers
Injects dependencies into the fields and methods ofinstance. An injectable constructor is ignored.- Parameters:
instance-
-
getInstance
Returns the appropriate instance for the giventype- Parameters:
type-- Returns:
-
getInstance
Returns the appropriate instance for the given name- Parameters:
className-- Returns:
-
getImplementationClass
Returns the implementation class for the giventype- Parameters:
typ-- Returns:
-
getImplementationClass
Returns the implementation class for the given name- Parameters:
className-- Returns:
-