public interface ComponentProvider
ComponentFactory
Modifier and Type | Method and Description |
---|---|
<T> T |
getComponent(Class<T> type)
Returns the component mapped for a given type.
|
<T> Class<? extends T> |
getImplementation(Class<T> type)
Returns the implementation type mapped for a given type.
|
ComponentProvider |
getParent() |
<T> T |
getSingleton(Class<T> type)
Deprecated.
since 4.5, use IoC. If you really need to look up a component, then use
getComponent(Class) |
<T> T |
newInstance(Class<T> type,
Object... parameters)
Creates a new instance of the passed interface / class by using the registered implementation.
|
<T> T |
newInstanceWithParameterResolvers(Class<T> type,
ParameterResolver... parameters) |
<T> Class<? extends T> getImplementation(Class<T> type) throws ClassNotFoundException
ClassNotFoundException
- in case there's no implementation for the provided type@Deprecated <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()
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.