|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.context.annotation.AnnotationScopeMetadataResolver
public class AnnotationScopeMetadataResolver
A ScopeMetadataResolver
implementation that (by default) checks for
the presence of the Scope
annotation on the bean class.
The exact type of annotation that is checked for is configurable via the
setScopeAnnotationType(Class)
property.
Scope
Constructor Summary | |
---|---|
AnnotationScopeMetadataResolver()
Create a new instance of the AnnotationScopeMetadataResolver class. |
|
AnnotationScopeMetadataResolver(ScopedProxyMode scopedProxyMode)
Create a new instance of the AnnotationScopeMetadataResolver class. |
Method Summary | |
---|---|
ScopeMetadata |
resolveScopeMetadata(BeanDefinition definition)
Resolve the ScopeMetadata appropriate to the supplied
bean definition . |
void |
setScopeAnnotationType(Class<? extends Annotation> scopeAnnotationType)
Set the type of annotation that is checked for by this AnnotationScopeMetadataResolver . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationScopeMetadataResolver()
AnnotationScopeMetadataResolver
class.
AnnotationScopeMetadataResolver(ScopedProxyMode)
,
ScopedProxyMode.NO
public AnnotationScopeMetadataResolver(ScopedProxyMode scopedProxyMode)
AnnotationScopeMetadataResolver
class.
scopedProxyMode
- the desired scoped-proxy modeMethod Detail |
---|
public void setScopeAnnotationType(Class<? extends Annotation> scopeAnnotationType)
AnnotationScopeMetadataResolver
.
scopeAnnotationType
- the target annotation typepublic ScopeMetadata resolveScopeMetadata(BeanDefinition definition)
ScopeMetadataResolver
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 spring
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.attributeNames()
of the supplied definition
.
resolveScopeMetadata
in interface ScopeMetadataResolver
definition
- the target bean definition
null
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |