spring-framework / org.springframework.beans.factory.annotation / AnnotatedGenericBeanDefinition

AnnotatedGenericBeanDefinition

open class AnnotatedGenericBeanDefinition : GenericBeanDefinition, AnnotatedBeanDefinition

Extension of the org.springframework.beans.factory.support.GenericBeanDefinition class, adding support for annotation metadata exposed through the AnnotatedBeanDefinition interface.

This GenericBeanDefinition variant is mainly useful for testing code that expects to operate on an AnnotatedBeanDefinition, for example strategy implementations in Spring's component scanning support (where the default definition class is org.springframework.context.annotation.ScannedGenericBeanDefinition, which also implements the AnnotatedBeanDefinition interface).

Author
Juergen Hoeller

Author
Chris Beams

Since
2.5

See Also
AnnotatedBeanDefinition#getMetadata()org.springframework.core.type.StandardAnnotationMetadata

Constructors

<init>

AnnotatedGenericBeanDefinition(beanClass: Class<*>)

Create a new AnnotatedGenericBeanDefinition for the given bean class.

AnnotatedGenericBeanDefinition(metadata: AnnotationMetadata)

Create a new AnnotatedGenericBeanDefinition for the given annotation metadata, allowing for ASM-based processing and avoidance of early loading of the bean class. Note that this constructor is functionally equivalent to org.springframework.context.annotation.ScannedGenericBeanDefinition, however the semantics of the latter indicate that a bean was discovered specifically via component-scanning as opposed to other means.

AnnotatedGenericBeanDefinition(metadata: AnnotationMetadata, factoryMethodMetadata: MethodMetadata)

Create a new AnnotatedGenericBeanDefinition for the given annotation metadata, based on an annotated class and a factory method on that class.

Functions

getFactoryMethodMetadata

fun getFactoryMethodMetadata(): MethodMetadata

getMetadata

fun getMetadata(): AnnotationMetadata

Inherited Functions

cloneBeanDefinition

open fun cloneBeanDefinition(): AbstractBeanDefinition

equals

open fun equals(other: Any?): Boolean

getParentName

open fun getParentName(): String

setParentName

open fun setParentName(parentName: String): Unit

toString

open fun toString(): String