Example usage for org.springframework.beans.factory.support GenericBeanDefinition setAbstract

List of usage examples for org.springframework.beans.factory.support GenericBeanDefinition setAbstract

Introduction

In this page you can find the example usage for org.springframework.beans.factory.support GenericBeanDefinition setAbstract.

Prototype

public void setAbstract(boolean abstractFlag) 

Source Link

Document

Set if this bean is "abstract", i.e.

Usage

From source file:com.techtrip.spring.beans.factory.ContextAwareBeanFactory.java

/**
 * Register bean.// w w  w .j a  va2  s  .c om
 *
 * @param beanToRegister the bean to register
 * @param beanName the bean name
 * @param scope the scope
 * @param setLazyInit the set lazy init
 * @param setAutowireCandidate the set autowire candidate
 */
public void registerBean(Class<?> beanToRegister, String beanName, String scope /* "session" */,
        boolean setLazyInit, boolean setAutowireCandidate) {
    GenericBeanDefinition beanDefinition = new GenericBeanDefinition();
    beanDefinition.setBeanClass(beanToRegister);
    beanDefinition.setLazyInit(setLazyInit);
    beanDefinition.setAbstract(false);
    beanDefinition.setAutowireCandidate(setAutowireCandidate);
    beanDefinition.setScope(scope);

    registry.registerBeanDefinition(beanName, beanDefinition);
}