public class Injector
extends java.lang.Object
Red (ahuseyno) |
Red (ahuseyno) |
Constructor and Description |
---|
Injector() |
Modifier and Type | Method and Description |
---|---|
<T> T |
getInstance(java.lang.Class<T> type)
Get implementation for the provided interface based on the mappings
loaded into the injector.
|
void |
loadMappings(java.util.Map<java.lang.String,java.lang.String> interfaceToImplementationMap)
Load the interface to implementation mappings into the injector.
|
public <T> T getInstance(java.lang.Class<T> type)
type
- The interface type to load.public void loadMappings(java.util.Map<java.lang.String,java.lang.String> interfaceToImplementationMap)
interfaceToImplementationMap
- The interface to implementation mapping.