From cbff8b01bbf896e1d1a277bd6887fda1e6cc2cbd Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Sun, 18 May 2014 23:55:57 +0200 Subject: [PATCH] Javadoc fixes --- .../annotation/ConfigurationClassUtils.java | 27 +++++++++++++++++-- .../context/request/ServletWebRequest.java | 2 +- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassUtils.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassUtils.java index 97139166f72..de6d7760be7 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassUtils.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 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. @@ -93,14 +93,36 @@ abstract class ConfigurationClassUtils { return false; } + /** + * Check the given metadata for a configuration class candidate + * (or nested component class declared within a configuration/component class). + * @param metadata the metadata of the annotated class + * @return {@code true} if the given class is to be registered as a + * reflection-detected bean definition; {@code false} otherwise + */ public static boolean isConfigurationCandidate(AnnotationMetadata metadata) { return (isFullConfigurationCandidate(metadata) || isLiteConfigurationCandidate(metadata)); } + /** + * Check the given metadata for a full configuration class candidate + * (i.e. a class annotated with {@code @Configuration}). + * @param metadata the metadata of the annotated class + * @return {@code true} if the given class is to be processed as a full + * configuration class, including cross-method call interception + */ public static boolean isFullConfigurationCandidate(AnnotationMetadata metadata) { return metadata.isAnnotated(Configuration.class.getName()); } + /** + * Check the given metadata for a lite configuration class candidate + * (e.g. a class annotated with {@code @Component} or just having + * {@code @Bean methods}). + * @param metadata the metadata of the annotated class + * @return {@code true} if the given class is to be processed as a lite + * configuration class, just registering it and scanning it for {@code @Bean} methods + */ public static boolean isLiteConfigurationCandidate(AnnotationMetadata metadata) { // Do not consider an interface or an annotation... return (!metadata.isInterface() && ( @@ -108,7 +130,8 @@ abstract class ConfigurationClassUtils { } /** - * Determine whether the given bean definition indicates a full @Configuration class. + * Determine whether the given bean definition indicates a full + * {@code @Configuration} class. */ public static boolean isFullConfigurationClass(BeanDefinition beanDef) { return CONFIGURATION_CLASS_FULL.equals(beanDef.getAttribute(CONFIGURATION_CLASS_ATTRIBUTE)); diff --git a/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java index 45f8ccdce95..10fe45035fb 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java @@ -76,7 +76,7 @@ public class ServletWebRequest extends ServletRequestAttributes implements Nativ /** - * Exposes the native {@link HttpServletRequest} that we're wrapping (if any). + * Exposes the native {@link HttpServletResponse} that we're wrapping (if any). */ public final HttpServletResponse getResponse() { return this.response;