|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.objectfactory.Components
public class Components
Static access utility for the currently set ComponentProvider
. The current ComponentProvider
is set
during start-up and there should be little reason to change it at runtime.
Since Magnolia 4.5, you are encouraged to use IoC, only in rare cases should you need to directly use this class.
ComponentProvider
Constructor Summary | |
---|---|
Components()
|
Method Summary | ||
---|---|---|
static
|
getComponent(Class<T> type)
Returns a component from the currently set ComponentProvider . |
|
static ComponentProvider |
getComponentProvider()
Returns the currently set ComponentProvider . |
|
static
|
getSingleton(Class<T> type)
Deprecated. since 4.5, use IoC to inject the component or use #getComponent(Class). |
|
static
|
newInstance(Class<T> type,
Object... parameters)
|
|
static void |
setComponentProvider(ComponentProvider provider)
Sets the current ComponentProvider . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Components()
Method Detail |
---|
public static void setComponentProvider(ComponentProvider provider)
ComponentProvider
.
public static ComponentProvider getComponentProvider()
ComponentProvider
.
public static <T> T getSingleton(Class<T> type)
ComponentProvider
.
ComponentProvider.getComponent(Class)
public static <T> T newInstance(Class<T> type, Object... parameters)
public static <T> T getComponent(Class<T> type)
ComponentProvider
. Consider using IoC to inject the component instead.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |