|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.objectfactory.guice.GuiceComponentProvider
public class GuiceComponentProvider
ComponentProvider implementation based on Guice.
ComponentProvider
,
GuiceComponentProviderBuilder
Constructor Summary | |
---|---|
GuiceComponentProvider(Map<Class<?>,Class<?>> typeMappings,
GuiceComponentProvider parentComponentProvider)
|
Method Summary | ||
---|---|---|
void |
destroy()
|
|
|
getComponent(Class<T> type)
Returns the component mapped for a given type. |
|
|
getImplementation(Class<T> type)
Returns the implementation type mapped for a given type. |
|
com.google.inject.Injector |
getInjector()
|
|
GuiceComponentProvider |
getParent()
|
|
|
getProvider(Class<T> type)
|
|
|
getSingleton(Class<T> type)
Deprecated. |
|
void |
injectMembers(Object instance)
|
|
|
newInstance(Class<T> type,
Object... parameters)
Creates a new instance of the passed interface / class by using the registered implementation. |
|
|
newInstanceWithParameterResolvers(Class<T> type,
ParameterResolver... parameterResolvers)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GuiceComponentProvider(Map<Class<?>,Class<?>> typeMappings, GuiceComponentProvider parentComponentProvider)
Method Detail |
---|
public <T> Class<? extends T> getImplementation(Class<T> type)
ComponentProvider
getImplementation
in interface ComponentProvider
@Deprecated public <T> T getSingleton(Class<T> type)
ComponentProvider
getSingleton
in interface ComponentProvider
ComponentProvider.getComponent(Class)
public <T> T getComponent(Class<T> type) throws NoSuchComponentException
ComponentProvider
getComponent
in interface ComponentProvider
NoSuchComponentException
- in case the component wasn't foundpublic <T> T newInstance(Class<T> type, Object... parameters)
ComponentProvider
MgnlInstantiationException
is thrown.
newInstance
in interface ComponentProvider
public <T> T newInstanceWithParameterResolvers(Class<T> type, ParameterResolver... parameterResolvers)
newInstanceWithParameterResolvers
in interface ComponentProvider
public com.google.inject.Injector getInjector()
public <T> javax.inject.Provider<T> getProvider(Class<T> type)
public void injectMembers(Object instance)
public void destroy()
public GuiceComponentProvider getParent()
getParent
in interface ComponentProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |