Class SpringApplicationContextInjectableObjectFactory<T>
- java.lang.Object
-
- com.hybris.cockpitng.dependencies.factory.impl.SpringApplicationContextInjectableObjectFactory<T>
-
- Type Parameters:
T-
- Direct Known Subclasses:
Editor.CockpitEditorRendererFactory
public class SpringApplicationContextInjectableObjectFactory<T> extends java.lang.ObjectFactory enables create an object of a certain type T and inject spring dependencies to the created object
-
-
Constructor Summary
Constructors Constructor Description SpringApplicationContextInjectableObjectFactory(org.springframework.context.ApplicationContext context, java.lang.Class<T> clazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Tcreate()Creates new objectTcreateAndInjectDependencies()Creates new object and then injects dependenciesprotected voidinjectDependencies(T obj)Injects dependencies to obj
-
-
-
Constructor Detail
-
SpringApplicationContextInjectableObjectFactory
public SpringApplicationContextInjectableObjectFactory(org.springframework.context.ApplicationContext context, java.lang.Class<T> clazz)- Parameters:
context- - spring application context to search for dependencies in itclazz- - type of new object
-
-
Method Detail
-
create
protected T create()
Creates new object- Returns:
-
injectDependencies
protected void injectDependencies(T obj)
Injects dependencies to obj- Parameters:
obj-
-
createAndInjectDependencies
public T createAndInjectDependencies()
Creates new object and then injects dependencies- Returns:
-
-