|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2014 the original author or authors. |
| 2 | + * Copyright 2002-2015 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
23 | 23 |
|
24 | 24 | /**
|
25 | 25 | * Indicates that a component is only eligible for registration when all
|
26 |
| - * {@linkplain #value() specified conditions} match. |
| 26 | + * {@linkplain #value specified conditions} match. |
27 | 27 | *
|
28 | 28 | * <p>A <em>condition</em> is any state that can be determined programmatically
|
29 | 29 | * before the bean definition is due to be registered (see {@link Condition} for details).
|
|
37 | 37 | * <li>as a method-level annotation on any {@link Bean @Bean} method</li>
|
38 | 38 | * </ul>
|
39 | 39 | *
|
40 |
| - * <p>If a {@code @Configuration} class is marked with {@code @Conditional}, all of the |
41 |
| - * {@code @Bean} methods, {@link Import @Import} and {@link ComponentScan @ComponentScan} |
42 |
| - * annotations associated with that class will be subject to the conditions. |
| 40 | + * <p>If a {@code @Configuration} class is marked with {@code @Conditional}, |
| 41 | + * all of the {@code @Bean} methods, {@link Import @Import} annotations, and |
| 42 | + * {@link ComponentScan @ComponentScan} annotations associated with that |
| 43 | + * class will be subject to the conditions. |
43 | 44 | *
|
44 |
| - * <p>NOTE: {@code @Conditional} annotations are not inherited; any conditions from |
45 |
| - * superclasses or from overridden methods are not being considered. |
| 45 | + * <p><strong>NOTE</strong>: Inheritance of {@code @Conditional} annotations |
| 46 | + * is not supported; any conditions from superclasses or from overridden |
| 47 | + * methods will not be considered. In order to enforce these semantics, |
| 48 | + * {@code @Conditional} itself is not declared as |
| 49 | + * {@link java.lang.annotation.Inherited @Inherited}; furthermore, any |
| 50 | + * custom <em>composed annotation</em> that is meta-annotated with |
| 51 | + * {@code @Conditional} must not be declared as {@code @Inherited}. |
46 | 52 | *
|
47 | 53 | * @author Phillip Webb
|
| 54 | + * @author Sam Brannen |
48 | 55 | * @since 4.0
|
49 | 56 | * @see Condition
|
50 | 57 | */
|
|
0 commit comments