|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.digitalis.utils.ioc.AbstractIoCRegistryImpl pt.digitalis.utils.ioc.guice.IoCRegistryGuiceImpl
public class IoCRegistryGuiceImpl
The registry for IoC services and contributions. This is the central piece that manages all contributions.
Field Summary |
---|
Fields inherited from class pt.digitalis.utils.ioc.AbstractIoCRegistryImpl |
---|
instance |
Method Summary | ||
---|---|---|
|
getImplementation(Class<T> serviceClass)
Returns the implementation of a given interface. |
|
|
getImplementation(Class<T> serviceClass,
String id)
Returns the implementation of a given interface with a given identification. |
|
|
getImplementationsMap(Class<T> serviceClass)
Returns the list of implementations for the interface with the given ID. |
|
static IIoCRegistry |
getRegistry()
Getter for the instance of IIoCRegistry . |
|
static IIoCRegistry |
getRegistry(Collection<Class<? extends com.google.inject.Module>> modules)
Getter for the instance of IIoCRegistry . |
|
static IIoCRegistry |
getRegistry(ModuleParser method)
Getter for the instance of IIoCRegistry |
|
void |
injectDependencies(Object obj)
Injects dependencies into an object. |
Methods inherited from class pt.digitalis.utils.ioc.AbstractIoCRegistryImpl |
---|
discoverModules, getImplementations |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static IIoCRegistry getRegistry() throws IoCException
IIoCRegistry
. Uses the FAST module parsing method by default.
IoCException
- if the registry object can't be instantiatedpublic static IIoCRegistry getRegistry(Collection<Class<? extends com.google.inject.Module>> modules) throws IoCException
IIoCRegistry
. Uses the FAST module parsing method by default. passed.
modules
- the IoC modules classes
IoCException
- if the registry object can't be accessedpublic static IIoCRegistry getRegistry(ModuleParser method) throws IoCException
IIoCRegistry
method
- the method for module discovery
IoCException
- if the registry object can't be instantiatedpublic <T> T getImplementation(Class<T> serviceClass)
IIoCRegistry
T
- the service's classserviceClass
- the service's interface type
IIoCRegistry.getImplementation(java.lang.Class)
public <T> T getImplementation(Class<T> serviceClass, String id)
IIoCRegistry
T
- the service's classserviceClass
- the service's interface typeid
- the implementation's id
IIoCRegistry.getImplementation(java.lang.Class, java.lang.String)
public <T> Map<String,T> getImplementationsMap(Class<T> serviceClass)
IIoCRegistry
T
- the service's classserviceClass
- the service's interface type
IIoCRegistry.getImplementationsMap(java.lang.Class)
public void injectDependencies(Object obj)
IIoCRegistry
obj
- the object to inject dependencies intoIIoCRegistry.injectDependencies(java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |