From 4412bc68aaf20556cdc71a21f1052f23b9f008b3 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 23 Oct 2014 01:06:01 +0200 Subject: [PATCH] Polish Javadoc --- .../cache/interceptor/BasicOperation.java | 2 +- .../CacheOperationInvocationContext.java | 14 +++---- .../expression/spel/SpelCompilerMode.java | 14 +++---- .../spel/SpelParserConfiguration.java | 10 ++--- .../jms/annotation/JmsListenerConfigurer.java | 6 +-- .../AnnotationDrivenBeanDefinitionParser.java | 1 - .../web/servlet/mvc/Controller.java | 41 +++++++++---------- .../resource/AppCacheManifestTransformer.java | 10 ++--- .../resource/VersionResourceResolver.java | 22 +++++----- 9 files changed, 60 insertions(+), 60 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/BasicOperation.java b/spring-context/src/main/java/org/springframework/cache/interceptor/BasicOperation.java index 194874f581..ea87427c88 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/BasicOperation.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/BasicOperation.java @@ -27,7 +27,7 @@ import java.util.Set; public interface BasicOperation { /** - * Return the cache name(s) associated to the operation. + * Return the cache name(s) associated with the operation. */ Set getCacheNames(); diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvocationContext.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvocationContext.java index 9d2e397740..7e556da667 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvocationContext.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvocationContext.java @@ -19,10 +19,10 @@ package org.springframework.cache.interceptor; import java.lang.reflect.Method; /** - * Represent the context of the invocation of a cache operation. + * Representation of the context of the invocation of a cache operation. * - *

The cache operation is static and independent of a particular invocation, - * this gathers the operation and a particular invocation. + *

The cache operation is static and independent of a particular invocation; + * this interface gathers the operation and a particular invocation. * * @author Stephane Nicoll * @since 4.1 @@ -30,22 +30,22 @@ import java.lang.reflect.Method; public interface CacheOperationInvocationContext { /** - * Return the cache operation + * Return the cache operation. */ O getOperation(); /** - * Return the target instance on which the method was invoked + * Return the target instance on which the method was invoked. */ Object getTarget(); /** - * Return the method + * Return the method which was invoked. */ Method getMethod(); /** - * Return the argument used to invoke the method + * Return the argument list used to invoke the method. */ Object[] getArgs(); diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/SpelCompilerMode.java b/spring-expression/src/main/java/org/springframework/expression/spel/SpelCompilerMode.java index adf8fbe68d..389625be4e 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/SpelCompilerMode.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/SpelCompilerMode.java @@ -19,28 +19,28 @@ package org.springframework.expression.spel; /** * Captures the possible configuration settings for a compiler that can be * used when evaluating expressions. - * + * * @author Andy Clement * @since 4.1 */ public enum SpelCompilerMode { /** - * The compiler is switched off, this is the default. + * The compiler is switched off; this is the default. */ OFF, - /** - * In immediate mode, expressions are compiled as soon as possible (usually after 1 interpreted run). + /** + * In immediate mode, expressions are compiled as soon as possible (usually after 1 interpreted run). * If a compiled expression fails it will throw an exception to the caller. */ IMMEDIATE, - /** - * In mixed mode, expression evaluate silently switches between interpreted and compiled over time. + /** + * In mixed mode, expression evaluation silently switches between interpreted and compiled over time. * After a number of runs the expression gets compiled. If it later fails (possibly due to inferred * type information changing) then that will be caught internally and the system switches back to - * interpreted mode. It may subsequently compile it again later. + * interpreted mode. It may subsequently compile it again later. */ MIXED diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/SpelParserConfiguration.java b/spring-expression/src/main/java/org/springframework/expression/spel/SpelParserConfiguration.java index cbefcc8cc6..bb3336746f 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/SpelParserConfiguration.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/SpelParserConfiguration.java @@ -51,14 +51,14 @@ public class SpelParserConfiguration { /** - * Create a new {@link SpelParserConfiguration} instance with default settings. + * Create a new {@code SpelParserConfiguration} instance with default settings. */ public SpelParserConfiguration() { this(null, null, false, false, Integer.MAX_VALUE); } /** - * Create a new {@link SpelParserConfiguration} instance. + * Create a new {@code SpelParserConfiguration} instance. * @param compilerMode the compiler mode for the parser * @param compilerClassLoader the ClassLoader to use as the basis for expression compilation */ @@ -67,7 +67,7 @@ public class SpelParserConfiguration { } /** - * Create a new {@link SpelParserConfiguration} instance. + * Create a new {@code SpelParserConfiguration} instance. * @param autoGrowNullReferences if null references should automatically grow * @param autoGrowCollections if collections should automatically grow * @see #SpelParserConfiguration(boolean, boolean, int) @@ -77,7 +77,7 @@ public class SpelParserConfiguration { } /** - * Create a new {@link SpelParserConfiguration} instance. + * Create a new {@code SpelParserConfiguration} instance. * @param autoGrowNullReferences if null references should automatically grow * @param autoGrowCollections if collections should automatically grow * @param maximumAutoGrowSize the maximum size that the collection can auto grow @@ -87,7 +87,7 @@ public class SpelParserConfiguration { } /** - * Create a new {@link SpelParserConfiguration} instance. + * Create a new {@code SpelParserConfiguration} instance. * @param compilerMode the compiler mode that parsers using this configuration object should use * @param compilerClassLoader the ClassLoader to use as the basis for expression compilation * @param autoGrowNullReferences if null references should automatically grow diff --git a/spring-jms/src/main/java/org/springframework/jms/annotation/JmsListenerConfigurer.java b/spring-jms/src/main/java/org/springframework/jms/annotation/JmsListenerConfigurer.java index c7b43d64bc..403e5bd3f0 100644 --- a/spring-jms/src/main/java/org/springframework/jms/annotation/JmsListenerConfigurer.java +++ b/spring-jms/src/main/java/org/springframework/jms/annotation/JmsListenerConfigurer.java @@ -19,10 +19,10 @@ package org.springframework.jms.annotation; import org.springframework.jms.config.JmsListenerEndpointRegistrar; /** - * Optional interface to be implemented by Spring managed bean willing + * Optional interface to be implemented by a Spring managed bean willing * to customize how JMS listener endpoints are configured. Typically - * used to defined the default {@link org.springframework.jms.config.JmsListenerContainerFactory - * JmsListenerContainerFactory} to use or for registering jms endpoints + * used to define the default {@link org.springframework.jms.config.JmsListenerContainerFactory + * JmsListenerContainerFactory} to use or for registering JMS endpoints * in a programmatic fashion as opposed to the declarative * approach of using the @{@link JmsListener} annotation. * diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java index 067127d186..dd10016099 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java @@ -122,7 +122,6 @@ import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolv *

  • and the {@link HandlerMapping} for serving resources * * Note that those beans can be configured by using the {@code path-matching} MVC namespace element. - * *

    Both the {@link RequestMappingHandlerAdapter} and the * {@link ExceptionHandlerExceptionResolver} are configured with instances of diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/Controller.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/Controller.java index 654062ed95..702ab7ccd9 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/Controller.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/Controller.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 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. @@ -33,39 +33,38 @@ import org.springframework.web.servlet.ModelAndView; * HTTP requests throughout the lifecycle of an application. To be able to * configure a Controller easily, Controller implementations are encouraged * to be (and usually are) JavaBeans. - *

    * - *

    Workflow

    + *

    Workflow

    * - *

    - * After a DispatcherServlet has received a request and has - * done its work to resolve locales, themes and suchlike, it then tries + *

    After a {@code DispatcherServlet} has received a request and has + * done its work to resolve locales, themes, and suchlike, it then tries * to resolve a Controller, using a * {@link org.springframework.web.servlet.HandlerMapping HandlerMapping}. * When a Controller has been found to handle the request, the * {@link #handleRequest(HttpServletRequest, HttpServletResponse) handleRequest} * method of the located Controller will be invoked; the located Controller - * is then responsible for handling the actual request and - if applicable - - * returning an appropriate + * is then responsible for handling the actual request and — if applicable + * — returning an appropriate * {@link org.springframework.web.servlet.ModelAndView ModelAndView}. - * So actually, this method is the main entrypoint for the + * So actually, this method is the main entry point for the * {@link org.springframework.web.servlet.DispatcherServlet DispatcherServlet} - * which delegates requests to controllers.

    + * which delegates requests to controllers. * - *

    So basically any direct implementation of the Controller interface + *

    So basically any direct implementation of the {@code Controller} interface * just handles HttpServletRequests and should return a ModelAndView, to be further * interpreted by the DispatcherServlet. Any additional functionality such as - * optional validation, form handling, etc should be obtained through extending - * one of the abstract controller classes mentioned above.

    + * optional validation, form handling, etc. should be obtained through extending + * {@link org.springframework.web.servlet.mvc.AbstractController AbstractController} + * or one of its subclasses. * - *

    Notes on design and testing

    + *

    Notes on design and testing

    * *

    The Controller interface is explicitly designed to operate on HttpServletRequest * and HttpServletResponse objects, just like an HttpServlet. It does not aim to * decouple itself from the Servlet API, in contrast to, for example, WebWork, JSF or Tapestry. * Instead, the full power of the Servlet API is available, allowing Controllers to be * general-purpose: a Controller is able to not only handle web user interface - * requests but also to process remoting protocols or to generate reports on demand.

    + * requests but also to process remoting protocols or to generate reports on demand. * *

    Controllers can easily be tested by passing in mock objects for the * HttpServletRequest and HttpServletResponse objects as parameters to the @@ -74,11 +73,11 @@ import org.springframework.web.servlet.ModelAndView; * that are suitable for testing any kind of web components, but are particularly * suitable for testing Spring web controllers. In contrast to a Struts Action, * there is no need to mock the ActionServlet or any other infrastructure; - * HttpServletRequest and HttpServletResponse are sufficient.

    + * mocking HttpServletRequest and HttpServletResponse is sufficient. * *

    If Controllers need to be aware of specific environment references, they can * choose to implement specific awareness interfaces, just like any other bean in a - * Spring (web) application context can do, for example:

    + * Spring (web) application context can do, for example: *