Skip to content

Commit

Permalink
Polish @scope Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeams committed Dec 10, 2011
1 parent 34798a4 commit 0449f6c
Showing 1 changed file with 14 additions and 6 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,7 +22,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.stereotype.Component;

/**
Expand All @@ -35,8 +35,13 @@
* the instance returned from the method.
*
* <p>In this context, scope means the lifecycle of an instance, such as
* {@code singleton}, {@code prototype}, and so forth.
*
* {@code singleton}, {@code prototype}, and so forth. Scopes provided out of the box in
* Spring may be referred to using the {@code SCOPE_*} constants available in
* via {@link ConfigurableBeanFactory} and {@code WebApplicationContext} interfaces.
*
* <p>To register additional custom scopes, see
* {@link org.springframework.beans.factory.config.CustomScopeConfigurer CustomScopeConfigurer}.
*
* @author Mark Fisher
* @author Chris Beams
* @since 2.5
Expand All @@ -50,9 +55,12 @@

/**
* Specifies the scope to use for the annotated component/bean.
* @return the specified scope
* @see ConfigurableBeanFactory#SCOPE_SINGLETON
* @see ConfigurableBeanFactory#SCOPE_PROTOTYPE
* @see org.springframework.web.context.WebApplicationContext#SCOPE_REQUEST
* @see org.springframework.web.context.WebApplicationContext#SCOPE_SESSION
*/
String value() default BeanDefinition.SCOPE_SINGLETON;
String value() default ConfigurableBeanFactory.SCOPE_SINGLETON;

/**
* Specifies whether a component should be configured as a scoped proxy
Expand Down

0 comments on commit 0449f6c

Please sign in to comment.