Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.BeanNameAware


    /** Instantiates the given bean, simulating the standard bean life cycle. */
    private <T> T instantiateBean(Class<T> clazz, ApplicationContext applicationContext) {
        T strategy = BeanUtils.instantiateClass(clazz);
        if (strategy instanceof BeanNameAware) {
            BeanNameAware beanNameAware = (BeanNameAware) strategy;
            beanNameAware.setBeanName(clazz.getName());
        }
        if (applicationContext != null) {
            if (strategy instanceof BeanClassLoaderAware) {
                ((BeanClassLoaderAware) strategy).setBeanClassLoader(applicationContext.getClassLoader());
            }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.BeanNameAware

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.