Skip to content

Commit 3114459

Browse files
committed
revised javadoc (SPR-5720)
1 parent 8b0a492 commit 3114459

File tree

3 files changed

+26
-23
lines changed

3 files changed

+26
-23
lines changed

org.springframework.test/src/main/java/org/springframework/test/context/ContextConfiguration.java

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,27 @@
3939
@Target(ElementType.TYPE)
4040
public @interface ContextConfiguration {
4141

42-
/**
43-
* The resource locations to use for loading an
44-
* {@link org.springframework.context.ApplicationContext ApplicationContext}.
45-
*/
46-
String[] locations() default {};
47-
4842
/**
4943
* Alias for {@link #locations() locations}.
50-
*
5144
* @since 3.0
5245
*/
5346
String[] value() default {};
5447

48+
/**
49+
* The resource locations to use for loading an
50+
* {@link org.springframework.context.ApplicationContext ApplicationContext}.
51+
* <p>Check out {@link org.springframework.test.context.support.AbstractContextLoader#modifyLocations)}'s
52+
* javadoc for details on how a location String will be interpreted at runtime,
53+
* in particular in case of a relative path. Also, check out the documentation on
54+
* {@link org.springframework.test.context.support.AbstractContextLoader#generateDefaultLocations}
55+
* for details on the default locations that are going to be used if none are specified.
56+
* <p>Note that the above-mentioned default rules only apply for a standard
57+
* {@link org.springframework.test.context.support.AbstractContextLoader} subclass
58+
* such as {@link org.springframework.test.context.support.GenericXmlContextLoader}
59+
* which is the effective default implementation used at runtime.
60+
*/
61+
String[] locations() default {};
62+
5563
/**
5664
* Whether or not {@link #locations() resource locations} from superclasses
5765
* should be <em>inherited</em>.
@@ -91,6 +99,10 @@
9199
* which is annotated with <code>&#064;ContextConfiguration</code> and specifies
92100
* an explicit loader. If no class in the hierarchy specifies an explicit
93101
* loader, a default loader will be used instead.
102+
* <p>The default concrete implementation chosen at runtime will be
103+
* {@link org.springframework.test.context.support.GenericXmlContextLoader}.
104+
* Also check out {@link org.springframework.test.context.support.AbstractContextLoader}'s
105+
* javadoc for details on the default behavior there.
94106
*/
95107
Class<? extends ContextLoader> loader() default ContextLoader.class;
96108

org.springframework.test/src/main/java/org/springframework/test/context/support/AbstractContextLoader.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2008 the original author or authors.
2+
* Copyright 2002-2009 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,8 +28,8 @@
2828
/**
2929
* Abstract application context loader, which provides a basis for all concrete
3030
* implementations of the {@link ContextLoader} strategy. Provides a
31-
* <em>Template Method</em> based approach for
32-
* {@link #processLocations(Class,String...) processing} locations.
31+
* <em>Template Method</em> based approach for {@link #processLocations processing}
32+
* locations.
3333
*
3434
* @author Sam Brannen
3535
* @author Juergen Hoeller
@@ -46,9 +46,8 @@ public abstract class AbstractContextLoader implements ContextLoader {
4646
* {@link #generateDefaultLocations(Class) generated} for the specified
4747
* {@link Class class} and the configured
4848
* {@link #getResourceSuffix() resource suffix}; otherwise, the supplied
49-
* <code>locations</code> will be
50-
* {@link #modifyLocations(Class,String...) modified} if necessary and
51-
* returned.
49+
* <code>locations</code> will be {@link #modifyLocations modified} if
50+
* necessary and returned.
5251
* @param clazz the class with which the locations are associated: to be
5352
* used when generating default locations
5453
* @param locations the unmodified locations to use for loading the

org.springframework.test/src/main/java/org/springframework/test/context/support/GenericXmlContextLoader.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2007 the original author or authors.
2+
* Copyright 2002-2009 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,23 +21,17 @@
2121
import org.springframework.context.support.GenericApplicationContext;
2222

2323
/**
24-
* <p>
2524
* Concrete implementation of {@link AbstractGenericContextLoader} which reads
2625
* bean definitions from XML resources.
27-
* </p>
2826
*
2927
* @author Sam Brannen
3028
* @since 2.5
3129
*/
3230
public class GenericXmlContextLoader extends AbstractGenericContextLoader {
3331

3432
/**
35-
* <p>
36-
* Creates a new {@link XmlBeanDefinitionReader}.
37-
* </p>
38-
*
33+
* Create a new {@link XmlBeanDefinitionReader}.
3934
* @return a new XmlBeanDefinitionReader.
40-
* @see AbstractGenericContextLoader#createBeanDefinitionReader(GenericApplicationContext)
4135
* @see XmlBeanDefinitionReader
4236
*/
4337
@Override
@@ -47,8 +41,6 @@ protected BeanDefinitionReader createBeanDefinitionReader(final GenericApplicati
4741

4842
/**
4943
* Returns &quot;<code>-context.xml</code>&quot;.
50-
*
51-
* @see org.springframework.test.context.support.AbstractContextLoader#getResourceSuffix()
5244
*/
5345
@Override
5446
public String getResourceSuffix() {

0 commit comments

Comments
 (0)