Skip to content

Commit 4412bc6

Browse files
committed
Polish Javadoc
1 parent a011b36 commit 4412bc6

File tree

9 files changed

+60
-60
lines changed

9 files changed

+60
-60
lines changed

spring-context/src/main/java/org/springframework/cache/interceptor/BasicOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
public interface BasicOperation {
2828

2929
/**
30-
* Return the cache name(s) associated to the operation.
30+
* Return the cache name(s) associated with the operation.
3131
*/
3232
Set<String> getCacheNames();
3333

spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvocationContext.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,33 @@
1919
import java.lang.reflect.Method;
2020

2121
/**
22-
* Represent the context of the invocation of a cache operation.
22+
* Representation of the context of the invocation of a cache operation.
2323
*
24-
* <p>The cache operation is static and independent of a particular invocation,
25-
* this gathers the operation and a particular invocation.
24+
* <p>The cache operation is static and independent of a particular invocation;
25+
* this interface gathers the operation and a particular invocation.
2626
*
2727
* @author Stephane Nicoll
2828
* @since 4.1
2929
*/
3030
public interface CacheOperationInvocationContext<O extends BasicOperation> {
3131

3232
/**
33-
* Return the cache operation
33+
* Return the cache operation.
3434
*/
3535
O getOperation();
3636

3737
/**
38-
* Return the target instance on which the method was invoked
38+
* Return the target instance on which the method was invoked.
3939
*/
4040
Object getTarget();
4141

4242
/**
43-
* Return the method
43+
* Return the method which was invoked.
4444
*/
4545
Method getMethod();
4646

4747
/**
48-
* Return the argument used to invoke the method
48+
* Return the argument list used to invoke the method.
4949
*/
5050
Object[] getArgs();
5151

spring-expression/src/main/java/org/springframework/expression/spel/SpelCompilerMode.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,28 @@
1919
/**
2020
* Captures the possible configuration settings for a compiler that can be
2121
* used when evaluating expressions.
22-
*
22+
*
2323
* @author Andy Clement
2424
* @since 4.1
2525
*/
2626
public enum SpelCompilerMode {
2727

2828
/**
29-
* The compiler is switched off, this is the default.
29+
* The compiler is switched off; this is the default.
3030
*/
3131
OFF,
3232

33-
/**
34-
* In immediate mode, expressions are compiled as soon as possible (usually after 1 interpreted run).
33+
/**
34+
* In immediate mode, expressions are compiled as soon as possible (usually after 1 interpreted run).
3535
* If a compiled expression fails it will throw an exception to the caller.
3636
*/
3737
IMMEDIATE,
3838

39-
/**
40-
* In mixed mode, expression evaluate silently switches between interpreted and compiled over time.
39+
/**
40+
* In mixed mode, expression evaluation silently switches between interpreted and compiled over time.
4141
* After a number of runs the expression gets compiled. If it later fails (possibly due to inferred
4242
* type information changing) then that will be caught internally and the system switches back to
43-
* interpreted mode. It may subsequently compile it again later.
43+
* interpreted mode. It may subsequently compile it again later.
4444
*/
4545
MIXED
4646

spring-expression/src/main/java/org/springframework/expression/spel/SpelParserConfiguration.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ public class SpelParserConfiguration {
5151

5252

5353
/**
54-
* Create a new {@link SpelParserConfiguration} instance with default settings.
54+
* Create a new {@code SpelParserConfiguration} instance with default settings.
5555
*/
5656
public SpelParserConfiguration() {
5757
this(null, null, false, false, Integer.MAX_VALUE);
5858
}
5959

6060
/**
61-
* Create a new {@link SpelParserConfiguration} instance.
61+
* Create a new {@code SpelParserConfiguration} instance.
6262
* @param compilerMode the compiler mode for the parser
6363
* @param compilerClassLoader the ClassLoader to use as the basis for expression compilation
6464
*/
@@ -67,7 +67,7 @@ public SpelParserConfiguration(SpelCompilerMode compilerMode, ClassLoader compil
6767
}
6868

6969
/**
70-
* Create a new {@link SpelParserConfiguration} instance.
70+
* Create a new {@code SpelParserConfiguration} instance.
7171
* @param autoGrowNullReferences if null references should automatically grow
7272
* @param autoGrowCollections if collections should automatically grow
7373
* @see #SpelParserConfiguration(boolean, boolean, int)
@@ -77,7 +77,7 @@ public SpelParserConfiguration(boolean autoGrowNullReferences, boolean autoGrowC
7777
}
7878

7979
/**
80-
* Create a new {@link SpelParserConfiguration} instance.
80+
* Create a new {@code SpelParserConfiguration} instance.
8181
* @param autoGrowNullReferences if null references should automatically grow
8282
* @param autoGrowCollections if collections should automatically grow
8383
* @param maximumAutoGrowSize the maximum size that the collection can auto grow
@@ -87,7 +87,7 @@ public SpelParserConfiguration(boolean autoGrowNullReferences, boolean autoGrowC
8787
}
8888

8989
/**
90-
* Create a new {@link SpelParserConfiguration} instance.
90+
* Create a new {@code SpelParserConfiguration} instance.
9191
* @param compilerMode the compiler mode that parsers using this configuration object should use
9292
* @param compilerClassLoader the ClassLoader to use as the basis for expression compilation
9393
* @param autoGrowNullReferences if null references should automatically grow

spring-jms/src/main/java/org/springframework/jms/annotation/JmsListenerConfigurer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
import org.springframework.jms.config.JmsListenerEndpointRegistrar;
2020

2121
/**
22-
* Optional interface to be implemented by Spring managed bean willing
22+
* Optional interface to be implemented by a Spring managed bean willing
2323
* to customize how JMS listener endpoints are configured. Typically
24-
* used to defined the default {@link org.springframework.jms.config.JmsListenerContainerFactory
25-
* JmsListenerContainerFactory} to use or for registering jms endpoints
24+
* used to define the default {@link org.springframework.jms.config.JmsListenerContainerFactory
25+
* JmsListenerContainerFactory} to use or for registering JMS endpoints
2626
* in a <em>programmatic</em> fashion as opposed to the <em>declarative</em>
2727
* approach of using the @{@link JmsListener} annotation.
2828
*

spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@
122122
* <li>and the {@link HandlerMapping} for serving resources
123123
* </ul>
124124
* Note that those beans can be configured by using the {@code path-matching} MVC namespace element.
125-
126125
*
127126
* <p>Both the {@link RequestMappingHandlerAdapter} and the
128127
* {@link ExceptionHandlerExceptionResolver} are configured with instances of

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/Controller.java

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,39 +33,38 @@
3333
* HTTP requests throughout the lifecycle of an application. To be able to
3434
* configure a Controller easily, Controller implementations are encouraged
3535
* to be (and usually are) JavaBeans.
36-
* </p>
3736
*
38-
* <p><b><a name="workflow">Workflow</a></b></p>
37+
* <h3><a name="workflow">Workflow</a></h3>
3938
*
40-
* <p>
41-
* After a <cde>DispatcherServlet</code> has received a request and has
42-
* done its work to resolve locales, themes and suchlike, it then tries
39+
* <p>After a {@code DispatcherServlet} has received a request and has
40+
* done its work to resolve locales, themes, and suchlike, it then tries
4341
* to resolve a Controller, using a
4442
* {@link org.springframework.web.servlet.HandlerMapping HandlerMapping}.
4543
* When a Controller has been found to handle the request, the
4644
* {@link #handleRequest(HttpServletRequest, HttpServletResponse) handleRequest}
4745
* method of the located Controller will be invoked; the located Controller
48-
* is then responsible for handling the actual request and - if applicable -
49-
* returning an appropriate
46+
* is then responsible for handling the actual request and &mdash; if applicable
47+
* &mdash; returning an appropriate
5048
* {@link org.springframework.web.servlet.ModelAndView ModelAndView}.
51-
* So actually, this method is the main entrypoint for the
49+
* So actually, this method is the main entry point for the
5250
* {@link org.springframework.web.servlet.DispatcherServlet DispatcherServlet}
53-
* which delegates requests to controllers.</p>
51+
* which delegates requests to controllers.
5452
*
55-
* <p>So basically any <i>direct</i> implementation of the Controller interface
53+
* <p>So basically any <i>direct</i> implementation of the {@code Controller} interface
5654
* just handles HttpServletRequests and should return a ModelAndView, to be further
5755
* interpreted by the DispatcherServlet. Any additional functionality such as
58-
* optional validation, form handling, etc should be obtained through extending
59-
* one of the abstract controller classes mentioned above.</p>
56+
* optional validation, form handling, etc. should be obtained through extending
57+
* {@link org.springframework.web.servlet.mvc.AbstractController AbstractController}
58+
* or one of its subclasses.
6059
*
61-
* <p><b>Notes on design and testing</b></p>
60+
* <h3>Notes on design and testing</h3>
6261
*
6362
* <p>The Controller interface is explicitly designed to operate on HttpServletRequest
6463
* and HttpServletResponse objects, just like an HttpServlet. It does not aim to
6564
* decouple itself from the Servlet API, in contrast to, for example, WebWork, JSF or Tapestry.
6665
* Instead, the full power of the Servlet API is available, allowing Controllers to be
6766
* general-purpose: a Controller is able to not only handle web user interface
68-
* requests but also to process remoting protocols or to generate reports on demand.</p>
67+
* requests but also to process remoting protocols or to generate reports on demand.
6968
*
7069
* <p>Controllers can easily be tested by passing in mock objects for the
7170
* HttpServletRequest and HttpServletResponse objects as parameters to the
@@ -74,11 +73,11 @@
7473
* that are suitable for testing any kind of web components, but are particularly
7574
* suitable for testing Spring web controllers. In contrast to a Struts Action,
7675
* there is no need to mock the ActionServlet or any other infrastructure;
77-
* HttpServletRequest and HttpServletResponse are sufficient.</p>
76+
* mocking HttpServletRequest and HttpServletResponse is sufficient.
7877
*
7978
* <p>If Controllers need to be aware of specific environment references, they can
8079
* choose to implement specific awareness interfaces, just like any other bean in a
81-
* Spring (web) application context can do, for example:</p>
80+
* Spring (web) application context can do, for example:
8281
* <ul>
8382
* <li>{@code org.springframework.context.ApplicationContextAware}</li>
8483
* <li>{@code org.springframework.context.ResourceLoaderAware}</li>
@@ -90,7 +89,7 @@
9089
* In general, it is recommended to keep the dependencies as minimal as possible:
9190
* for example, if all you need is resource loading, implement ResourceLoaderAware only.
9291
* Alternatively, derive from the WebApplicationObjectSupport base class, which gives
93-
* you all those references through convenient accessors - but requires an
92+
* you all those references through convenient accessors but requires an
9493
* ApplicationContext reference on initialization.
9594
*
9695
* <p>Controllers can optionally implement the {@link LastModified} interface.
@@ -111,9 +110,9 @@ public interface Controller {
111110

112111
/**
113112
* Process the request and return a ModelAndView object which the DispatcherServlet
114-
* will render. A {@code null} return value is not an error: It indicates that
115-
* this object completed request processing itself, thus there is no ModelAndView
116-
* to render.
113+
* will render. A {@code null} return value is not an error: it indicates that
114+
* this object completed request processing itself and that there is therefore no
115+
* ModelAndView to render.
117116
* @param request current HTTP request
118117
* @param response current HTTP response
119118
* @return a ModelAndView to render, or {@code null} if handled directly

spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
* All files that have the ".manifest" file extension, or the extension given in the constructor, will be transformed
5050
* by this class.
5151
*
52-
* This hash is computed using the content of the appcache manifest and the content of the linked resources; so
53-
* changing a resource linked in the manifest or the manifest itself should invalidate browser cache.
52+
* <p>This hash is computed using the content of the appcache manifest and the content of the linked resources; so
53+
* changing a resource linked in the manifest or the manifest itself should invalidate the browser cache.
5454
*
5555
* @author Brian Clozel
5656
* @see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#offline">HTML5 offline
@@ -71,7 +71,7 @@ public class AppCacheManifestTransformer extends ResourceTransformerSupport {
7171

7272

7373
/**
74-
* Create an AppCacheResourceTransformer that transforms files with extension ".manifest"
74+
* Create an AppCacheResourceTransformer that transforms files with extension ".manifest".
7575
*/
7676
public AppCacheManifestTransformer() {
7777
this("manifest");
@@ -145,8 +145,8 @@ public Resource transform(HttpServletRequest request, Resource resource, Resourc
145145
private static interface SectionTransformer {
146146

147147
/**
148-
* Transforms a line in a section of the manifest
149-
* <p>The actual transformation depends on the chose transformation strategy
148+
* Transforms a line in a section of the manifest.
149+
* <p>The actual transformation depends on the chosen transformation strategy
150150
* for the current manifest section (CACHE, NETWORK, FALLBACK, etc).
151151
*/
152152
String transform(String line, HashBuilder builder, Resource resource,

spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionResourceResolver.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929

3030
/**
3131
* Resolves request paths containing a version string that can be used as part
32-
* of an HTTP caching strategy in which a resource is cached with a far future
33-
* date (e.g. 1 year) and cached until the version, and therefore the URL, is
34-
* changed.
32+
* of an HTTP caching strategy in which a resource is cached with a date in the
33+
* distant future (e.g. 1 year) and cached until the version, and therefore the
34+
* URL, is changed.
3535
*
36-
* <p>Different versioning strategies exist and this resolver must be configured
36+
* <p>Different versioning strategies exist, and this resolver must be configured
3737
* with one or more such strategies along with path mappings to indicate which
3838
* strategy applies to which resources.
3939
*
@@ -42,9 +42,10 @@
4242
* cannot be combined with JavaScript module loaders. For such cases the
4343
* {@code FixedVersionStrategy} is a better choice.
4444
*
45-
* <p>Note that using this resolver to serve CSS files means the
45+
* <p>Note that using this resolver to serve CSS files means that the
4646
* {@link CssLinkResourceTransformer} should also be used in order to modify
47-
* links within CSS files to also contain versions.
47+
* links within CSS files to also contain the appropriate versions generated
48+
* by this resolver.
4849
*
4950
* @author Brian Clozel
5051
* @author Rossen Stoyanchev
@@ -95,11 +96,12 @@ public VersionResourceResolver addContentVersionStrategy(String... pathPatterns)
9596

9697
/**
9798
* Insert a fixed, prefix-based version in resource URLs that match the given
98-
* path patterns, e.g. {@code "{version}/js/main.js"}. This is useful (vs
99+
* path patterns, for example: <code>"{version}/js/main.js"</code>. This is useful (vs.
99100
* content-based versions) when using JavaScript module loaders.
100-
* <p>The version may be a random number, the current date, fetched from a
101-
* git commit sha, a property file, environment variable, and set with SpEL
102-
* expressions in the configuration (e.g. see {@code @Value} in Java config).
101+
* <p>The version may be a random number, the current date, or a value
102+
* fetched from a git commit sha, a property file, or environment variable
103+
* and set with SpEL expressions in the configuration (e.g. see {@code @Value}
104+
* in Java config).
103105
* @param version a version string
104106
* @param pathPatterns one or more resource URL path patterns
105107
* @return the current instance for chained method invocation

0 commit comments

Comments
 (0)