|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ComponentProvider
ComponentProvider is responsible for providing components, these can be scoped as singletons or live in narrower scopes such as local and session, or be non scoped in which case a new instances will be created. Magnolia "beans", "managers" etc are all provided by this. Since Magnolia 4.5, you are encouraged to use IoC, only in rare cases should you need to directly use this class.
ComponentFactory
Method Summary | ||
---|---|---|
|
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. |
|
ComponentProvider |
getParent()
|
|
|
getSingleton(Class<T> type)
Deprecated. since 4.5, use IoC. If you really need to look up a component, then use getComponent(Class) |
|
|
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... parameters)
|
Method Detail |
---|
<T> Class<? extends T> getImplementation(Class<T> type) throws ClassNotFoundException
ClassNotFoundException
- in case there's no implementation for the provided type<T> T getSingleton(Class<T> type)
getComponent(Class)
getComponent(Class)
<T> T getComponent(Class<T> type) throws NoSuchComponentException
NoSuchComponentException
- in case the component wasn't found<T> T newInstance(Class<T> type, Object... parameters)
MgnlInstantiationException
is thrown.
<T> T newInstanceWithParameterResolvers(Class<T> type, ParameterResolver... parameters)
ComponentProvider getParent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |