Browse Source

Update @AliasFor Javadoc regarding new 'value' alias

Issue: SPR-13289
pull/849/merge
Sam Brannen 11 years ago
parent
commit
1c8ac2b2aa
  1. 8
      spring-core/src/main/java/org/springframework/core/annotation/AliasFor.java

8
spring-core/src/main/java/org/springframework/core/annotation/AliasFor.java

@ -60,8 +60,8 @@ import java.lang.annotation.Target;
* <li><strong>Aliases within an annotation</strong>: * <li><strong>Aliases within an annotation</strong>:
* <ol> * <ol>
* <li>Each attribute that makes up an aliased pair must be annotated with * <li>Each attribute that makes up an aliased pair must be annotated with
* {@code @AliasFor}, and the {@link #attribute} must reference the * {@code @AliasFor}, and either the {@link #attribute} or the {@link #value}
* <em>other</em> attribute in the pair.</li> * attribute must reference the <em>other</em> attribute in the pair.</li>
* <li>Aliased attributes must declare the same return type.</li> * <li>Aliased attributes must declare the same return type.</li>
* <li>Aliased attributes must declare a default value.</li> * <li>Aliased attributes must declare a default value.</li>
* <li>Aliased attributes must declare the same default value.</li> * <li>Aliased attributes must declare the same default value.</li>
@ -84,10 +84,10 @@ import java.lang.annotation.Target;
* <h3>Example: Aliases within an Annotation</h3> * <h3>Example: Aliases within an Annotation</h3>
* <pre class="code"> public &#064;interface ContextConfiguration { * <pre class="code"> public &#064;interface ContextConfiguration {
* *
* &#064;AliasFor(attribute = "locations") * &#064;AliasFor("locations")
* String[] value() default {}; * String[] value() default {};
* *
* &#064;AliasFor(attribute = "value") * &#064;AliasFor("value")
* String[] locations() default {}; * String[] locations() default {};
* *
* // ... * // ...

Loading…
Cancel
Save