类 AnnotationScopeMetadataResolver

java.lang.Object
cn.taketoday.context.annotation.AnnotationScopeMetadataResolver
所有已实现的接口:
ScopeMetadataResolver

public class AnnotationScopeMetadataResolver extends Object implements ScopeMetadataResolver
A ScopeMetadataResolver implementation that by default checks for the presence of Framework's @Scope annotation on the bean class.

The exact type of annotation that is checked for is configurable via setScopeAnnotationType(Class).

从以下版本开始:
4.0
作者:
Mark Fisher, Juergen Hoeller, Sam Brannen, TODAY 2021/10/26 15:57
另请参阅:
  • 字段详细资料

    • scopeAnnotationType

      protected Class<? extends Annotation> scopeAnnotationType
  • 构造器详细资料

  • 方法详细资料

    • setScopeAnnotationType

      public void setScopeAnnotationType(Class<? extends Annotation> scopeAnnotationType)
      Set the type of annotation that is checked for by this AnnotationScopeMetadataResolver.
      参数:
      scopeAnnotationType - the target annotation type
    • resolveScopeMetadata

      public ScopeMetadata resolveScopeMetadata(BeanDefinition definition)
      从接口复制的说明: ScopeMetadataResolver
      Resolve the ScopeMetadata appropriate to the supplied bean definition.

      Implementations can of course use any strategy they like to determine the scope metadata, but some implementations that immediately to mind might be to use source level annotations present on the class of the supplied definition, or to use metadata present in the AttributeAccessor.getAttributeNames() of the supplied definition.

      指定者:
      resolveScopeMetadata 在接口中 ScopeMetadataResolver
      参数:
      definition - the target bean definition
      返回:
      the relevant scope metadata; never null