+ Added 'proxyMode' attribute to @Scope annotation

+ Eliminated @ScopedProxy in favor of @Scope(proxyMode=NO|INTERFACES|TARGET_CLASS)
This commit is contained in:
Chris Beams
2009-03-07 04:54:31 +00:00
parent 9735c8024c
commit 3231f458c8
7 changed files with 73 additions and 165 deletions

View File

@@ -44,5 +44,17 @@ public @interface Scope {
* @return the desired scope
*/
String value() default BeanDefinition.SCOPE_SINGLETON;
/**
* Specifies whether a component should be configured as a scoped proxy
* and if so, whether the proxy should be interface-based or subclass-based.
*
* <p>Defaults to {@link ScopedProxyMode#NO}, indicating no scoped proxy
* should be created.
*
* <p>Analogous to {@literal <aop:scoped-proxy/>} support in XML. Valid
* only in conjunction with a non-singleton, non-prototype {@link #value()}.
*/
ScopedProxyMode proxyMode() default ScopedProxyMode.NO;
}