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

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

Introduction

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

Prototype

@Override
@Nullable
public String getScope() 

Source Link

Document

Return the name of the target scope for the bean.

Usage

From source file:com.github.persapiens.jsfboot.annotations.JsfCdiToSpringBeanNameGeneratorIT.java

public void testGenericBeanDefinition() {
    AnnotationMetadata annotationMetadata = new StandardAnnotationMetadata(SessionScopedClass.class);
    AnnotatedBeanDefinition annotatedBeanDefinition = new AnnotatedGenericBeanDefinition(annotationMetadata);
    GenericBeanDefinition beanDefinition = new GenericBeanDefinition(annotatedBeanDefinition);

    BeanDefinitionRegistry registry = new SimpleBeanDefinitionRegistry();

    AnnotationBeanNameGenerator annotationBeanNameGeneratorannotationScopeMetadataResolver = new JsfCdiToSpringBeanNameGenerator();

    annotationBeanNameGeneratorannotationScopeMetadataResolver.generateBeanName(beanDefinition, registry);

    assertThat(beanDefinition.getScope()).isEmpty();
}