Browse Source

Polish javadoc for when to use class names rather than class references

See gh-48395
pull/48965/head
Phillip Webb 3 months ago
parent
commit
08e2cab6b0
  1. 16
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfiguration.java
  2. 8
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigureAfter.java
  3. 8
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigureBefore.java
  4. 8
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/EnableAutoConfiguration.java
  5. 8
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/SpringBootApplication.java
  6. 20
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnBean.java
  7. 8
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnClass.java
  8. 28
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBean.java
  9. 8
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnSingleCandidate.java

16
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfiguration.java

@ -80,10 +80,10 @@ public @interface AutoConfiguration { @@ -80,10 +80,10 @@ public @interface AutoConfiguration {
* The auto-configuration classes that should have not yet been applied.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
* only use the {@link #beforeName} attribute.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation. In order to use this annotation as a
* meta-annotation, only use the {@link #beforeName} attribute.
* @return the classes
*/
@AliasFor(annotation = AutoConfigureBefore.class, attribute = "value")
@ -103,10 +103,10 @@ public @interface AutoConfiguration { @@ -103,10 +103,10 @@ public @interface AutoConfiguration {
* The auto-configuration classes that should have already been applied.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
* only use the {@link #afterName} attribute.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation. In order to use this annotation as a
* meta-annotation, only use the {@link #afterName} attribute.
* @return the classes
*/
@AliasFor(annotation = AutoConfigureAfter.class, attribute = "value")

8
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigureAfter.java

@ -47,10 +47,10 @@ public @interface AutoConfigureAfter { @@ -47,10 +47,10 @@ public @interface AutoConfigureAfter {
* The auto-configuration classes that should have already been applied.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
* only use the {@link #name} attribute.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation. In order to use this annotation as a
* meta-annotation, only use the {@link #name} attribute.
* @return the classes
*/
Class<?>[] value() default {};

8
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigureBefore.java

@ -47,10 +47,10 @@ public @interface AutoConfigureBefore { @@ -47,10 +47,10 @@ public @interface AutoConfigureBefore {
* The auto-configuration classes that should have not yet been applied.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
* only use the {@link #name} attribute.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation. In order to use this annotation as a
* meta-annotation, only use the {@link #name} attribute.
* @return the classes
*/
Class<?>[] value() default {};

8
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/EnableAutoConfiguration.java

@ -92,10 +92,10 @@ public @interface EnableAutoConfiguration { @@ -92,10 +92,10 @@ public @interface EnableAutoConfiguration {
* Exclude specific auto-configuration classes such that they will never be applied.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
* only use the {@link #excludeName()} attribute.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation. In order to use this annotation as a
* meta-annotation, only use the {@link #excludeName()} attribute.
* @return the classes to exclude
*/
Class<?>[] exclude() default {};

8
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/SpringBootApplication.java

@ -61,10 +61,10 @@ public @interface SpringBootApplication { @@ -61,10 +61,10 @@ public @interface SpringBootApplication {
* Exclude specific auto-configuration classes such that they will never be applied.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
* only use the {@link #excludeName} attribute.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation. In order to use this annotation as a
* meta-annotation, only use the {@link #excludeName} attribute.
* @return the classes to exclude
*/
@AliasFor(annotation = EnableAutoConfiguration.class)

20
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnBean.java

@ -74,10 +74,10 @@ public @interface ConditionalOnBean { @@ -74,10 +74,10 @@ public @interface ConditionalOnBean {
* not autowire candidates or that are not default candidates are ignored.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
* only use the {@link #type} attribute.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation. In order to use this annotation as a
* meta-annotation, only use the {@link #type} attribute.
* @return the class types of beans to check
* @see Bean#autowireCandidate()
* @see BeanDefinition#isAutowireCandidate
@ -105,9 +105,9 @@ public @interface ConditionalOnBean { @@ -105,9 +105,9 @@ public @interface ConditionalOnBean {
* ignored.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation.
* @return the class-level annotation types to check
* @see Bean#autowireCandidate()
* @see BeanDefinition#isAutowireCandidate
@ -137,9 +137,9 @@ public @interface ConditionalOnBean { @@ -137,9 +137,9 @@ public @interface ConditionalOnBean {
* {@code Name} and {@code NameRegistration<Name>}.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation.
* @return the container types
* @since 2.1.0
*/

8
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnClass.java

@ -69,10 +69,10 @@ public @interface ConditionalOnClass { @@ -69,10 +69,10 @@ public @interface ConditionalOnClass {
* The classes that must be present.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
* only use the {@link #name} attribute.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation. In order to use this annotation as a
* meta-annotation, only use the {@link #name} attribute.
* @return the classes that must be present
*/
Class<?>[] value() default {};

28
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBean.java

@ -75,10 +75,10 @@ public @interface ConditionalOnMissingBean { @@ -75,10 +75,10 @@ public @interface ConditionalOnMissingBean {
* autowire candidates or that are not default candidates are ignored.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
* only use the {@link #type} attribute.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation. In order to use this annotation as a
* meta-annotation, only use the {@link #type} attribute.
* @return the class types of beans to check
* @see Bean#autowireCandidate()
* @see BeanDefinition#isAutowireCandidate
@ -103,10 +103,10 @@ public @interface ConditionalOnMissingBean { @@ -103,10 +103,10 @@ public @interface ConditionalOnMissingBean {
* The class types of beans that should be ignored when identifying matching beans.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
* only use the {@link #ignoredType} attribute.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation. In order to use this annotation as a
* meta-annotation, only use the {@link #ignoredType} attribute.
* @return the class types of beans to ignore
* @since 1.2.5
*/
@ -127,9 +127,9 @@ public @interface ConditionalOnMissingBean { @@ -127,9 +127,9 @@ public @interface ConditionalOnMissingBean {
* candidates are ignored.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation.
* @return the class-level annotation types to check
* @see Bean#autowireCandidate()
* @see BeanDefinition#isAutowireCandidate
@ -159,9 +159,9 @@ public @interface ConditionalOnMissingBean { @@ -159,9 +159,9 @@ public @interface ConditionalOnMissingBean {
* {@code Name} and {@code NameRegistration<Name>}.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation.
* @return the container types
* @since 2.1.0
*/

8
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnSingleCandidate.java

@ -58,10 +58,10 @@ public @interface ConditionalOnSingleCandidate { @@ -58,10 +58,10 @@ public @interface ConditionalOnSingleCandidate {
* are not default candidates, or that are fallback candidates are ignored.
* <p>
* Since this annotation is parsed by loading class bytecode, it is safe to specify
* classes here that may ultimately not be on the classpath, only if this annotation
* is directly on the affected component and <b>not</b> if this annotation is used as
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
* only use the {@link #type} attribute.
* classes here that may ultimately not be on the classpath, but only if this
* annotation is directly on the affected component and <b>not</b> if this annotation
* is used as a composed, meta-annotation. In order to use this annotation as a
* meta-annotation, only use the {@link #type} attribute.
* <p>
* This attribute may <strong>not</strong> be used in conjunction with
* {@link #type()}, but it may be used instead of {@link #type()}.

Loading…
Cancel
Save