Package org.frankframework.util
Class SpringUtils
java.lang.Object
org.frankframework.util.SpringUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
autowire
(org.springframework.context.ApplicationContext applicationContext, Object existingBean, int autowireMode) static void
autowireByName
(org.springframework.context.ApplicationContext applicationContext, Object existingBean) static void
autowireByType
(org.springframework.context.ApplicationContext applicationContext, Object existingBean) static <T> T
createBean
(org.springframework.context.ApplicationContext applicationContext, Class<T> beanClass) This is effectively a superset of what autowire provides, adding initializeBean behavior.static Object
createBean
(org.springframework.context.ApplicationContext applicationContext, String className) static <T> T
createBean
(org.springframework.context.ApplicationContext applicationContext, T... reified) Create bean without passing the bean-class.static <T> Class
<T> getClassOf
(T[] array) static void
registerSingleton
(org.springframework.context.ApplicationContext applicationContext, String name, Object bean)
-
Constructor Details
-
SpringUtils
public SpringUtils()
-
-
Method Details
-
createBean
@SafeVarargs public static <T> T createBean(org.springframework.context.ApplicationContext applicationContext, T... reified) Create bean without passing the bean-class. Can be used when the compiler can statically determine the class from the variable to which the bean is assigned. Do not pass actual argument to reified, Java will auto-detect the class of the bean type. -
createBean
public static <T> T createBean(org.springframework.context.ApplicationContext applicationContext, Class<T> beanClass) This is effectively a superset of what autowire provides, adding initializeBean behavior. NB: Even though this has been deprecated, we cannot use the new/alternative method due to the autowireByName capability. -
createBean
public static Object createBean(org.springframework.context.ApplicationContext applicationContext, String className) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
autowireByType
public static void autowireByType(org.springframework.context.ApplicationContext applicationContext, Object existingBean) -
autowireByName
public static void autowireByName(org.springframework.context.ApplicationContext applicationContext, Object existingBean) -
autowire
public static void autowire(org.springframework.context.ApplicationContext applicationContext, Object existingBean, int autowireMode) -
registerSingleton
-
getClassOf
-