Convert cache package line endings from CRLF => LF

Unfortunately creates a large diff due to whitespace changes as well as
false attribution of authorship from a git/svn 'blame' perspective.

Be sure to perform diffs using `git diff -w` or `svn diff -w` when
reviewing recent changes to these sources to ignore all whitespace.
This commit is contained in:
Chris Beams 2011-11-16 04:21:06 +00:00
parent f9879b762b
commit a252a285e2
46 changed files with 3767 additions and 3767 deletions

View File

@ -21,7 +21,7 @@ package org.springframework.cache;
*
* <b>Note:</b> Due to the generic use of caching, it is recommended that
* implementations allow storage of <tt>null</tt> values (for example to
* cache methods that return <code>null</code>).
* cache methods that return {@code null}).
*
* @author Costin Leau
* @since 3.1

View File

@ -28,8 +28,8 @@ public interface CacheManager {
/**
* Return the cache associated with the given name.
* @param name cache identifier (must not be <code>null</code>)
* @return associated cache, or <code>null</code> if none is found
* @param name cache identifier (must not be {@code null})
* @return associated cache, or {@code null} if none is found
*/
Cache getCache(String name);

View File

@ -21,7 +21,6 @@ import java.util.Collection;
import org.springframework.cache.interceptor.CacheOperation;
/**
* Strategy interface for parsing known caching annotation types.
* {@link AnnotationCacheDefinitionSource} delegates to such
@ -37,11 +36,11 @@ public interface CacheAnnotationParser {
* Parses the cache definition for the given method or class,
* based on a known annotation type.
* <p>This essentially parses a known cache annotation into Spring's
* metadata attribute class. Returns <code>null</code> if the method/class
* metadata attribute class. Returns {@code null} if the method/class
* is not cacheable.
* @param ae the annotated method or class
* @return CacheOperation the configured caching operation,
* or <code>null</code> if none was found
* or {@code null} if none was found
* @see AnnotationCacheOperationSource#determineCacheOperation
*/
Collection<CacheOperation> parseCacheAnnotations(AnnotatedElement ae);

View File

@ -1,5 +1,5 @@
/*
* Copyright 2011 the original author or authors.
* Copyright 2002-2011 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.
@ -27,6 +27,7 @@ import java.lang.annotation.Target;
* Group annotation for multiple cache annotations (of different or the same type).
*
* @author Costin Leau
* @author Chris Beams
* @since 3.1
*/
@Target({ ElementType.METHOD, ElementType.TYPE })

View File

@ -26,7 +26,6 @@ import java.lang.annotation.Target;
import org.springframework.cache.Cache;
/**
*
* Annotation indicating that a method (or all methods on a class) trigger(s)
* a {@link Cache#put(Object, Object)} operation. As opposed to {@link Cacheable} annotation,
* this annotation does not cause the target method to be skipped - rather it

View File

@ -29,7 +29,8 @@ import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.util.ObjectUtils;
/**
* Strategy implementation for parsing Spring's {@link Cacheable}, {@link CacheEvict} and {@link CachePut} annotations.
* Strategy implementation for parsing Spring's {@link Cacheable},
* {@link CacheEvict} and {@link CachePut} annotations.
*
* @author Costin Leau
* @author Juergen Hoeller

View File

@ -1,9 +1,8 @@
/**
* JDK 1.5+ annotation for caching demarcation.
* Annotations and supporting classes for declarative cache management.
* Hooked into Spring's caching interception infrastructure
* via CacheOperationSource implementation.
*
* via {@link org.springframework.cache.interceptor.CacheOperationSource
* CacheOperationSource} implementation.
*/
package org.springframework.cache.annotation;

View File

@ -25,14 +25,14 @@ import org.springframework.cache.support.ValueWrapperImpl;
/**
* Simple {@link Cache} implementation based on the core JDK
* <code>java.util.concurrent</code> package.
* {@code java.util.concurrent} package.
*
* <p>Useful for testing or simple caching scenarios, typically in combination
* with {@link org.springframework.cache.support.SimpleCacheManager} or
* dynamically through {@link ConcurrentMapCacheManager}.
*
* <p><b>Note:</b> As {@link ConcurrentHashMap} (the default implementation used)
* does not allow for <code>null</code> values to be stored, this class will replace
* does not allow for {@code null} values to be stored, this class will replace
* them with a predefined internal object. This behavior can be changed through the
* {@link #ConcurrentMapCache(String, ConcurrentMap, boolean)} constructor.
*

View File

@ -66,7 +66,7 @@ public class ConcurrentMapCacheFactoryBean
}
/**
* Set whether to allow <code>null</code> values
* Set whether to allow {@code null} values
* (adapting them to an internal null holder value).
* <p>Default is "true".
*/

View File

@ -1,10 +1,9 @@
/**
*
* Implementation package for java.util.concurrent based
* caches. Provides a CacheManager and Cache implementation
* for usage in a Spring context.
*
* Implementation package for {@code java.util.concurrent} based caches.
* Provides a {@link org.springframework.cache.CacheManager CacheManager}
* and {@link org.springframework.cache.Cache Cache} implementation for
* use in a Spring context.
*/
package org.springframework.cache.concurrent;

View File

@ -33,14 +33,15 @@ import org.w3c.dom.Element;
/**
* {@link org.springframework.beans.factory.xml.BeanDefinitionParser}
* implementation that allows users to easily configure all the infrastructure
* beans required to enable annotation-driven cache demarcation.
* implementation that allows users to easily configure all the
* infrastructure beans required to enable annotation-driven cache
* demarcation.
*
* <p>By default, all proxies are created as JDK proxies. This may cause some
* problems if you are injecting objects as concrete classes rather than
* interfaces. To overcome this restriction you can set the
* '<code>proxy-target-class</code>' attribute to '<code>true</code>', which
* will result in class-based proxies being created.
* <p>By default, all proxies are created as JDK proxies. This may cause
* some problems if you are injecting objects as concrete classes rather
* than interfaces. To overcome this restriction you can set the
* '{@code proxy-target-class}' attribute to '{@code true}', which will
* result in class-based proxies being created.
*
* @author Costin Leau
* @since 3.1
@ -48,9 +49,9 @@ import org.w3c.dom.Element;
class AnnotationDrivenCacheBeanDefinitionParser implements BeanDefinitionParser {
/**
* Parses the '<code>&lt;cache:annotation-driven/&gt;</code>' tag. Will
* {@link AopNamespaceUtils#registerAutoProxyCreatorIfNecessary register an AutoProxyCreator}
* with the container as necessary.
* Parses the '{@code <cache:annotation-driven>}' tag. Will
* {@link AopNamespaceUtils#registerAutoProxyCreatorIfNecessary
* register an AutoProxyCreator} with the container as necessary.
*/
public BeanDefinition parse(Element element, ParserContext parserContext) {
String mode = element.getAttribute("mode");

View File

@ -44,7 +44,6 @@ import org.w3c.dom.Element;
* BeanDefinitionParser} for the {@code <tx:advice/>} tag.
*
* @author Costin Leau
*
*/
class CacheAdviceParser extends AbstractSingleBeanDefinitionParser {

View File

@ -23,8 +23,8 @@ import org.springframework.util.StringUtils;
import org.w3c.dom.Element;
/**
* <code>NamespaceHandler</code> allowing for the configuration of
* declarative cache management using either XML or using annotations.
* {@code NamespaceHandler} allowing for the configuration of declarative
* cache management using either XML or using annotations.
*
* <p>This namespace handler is the central piece of functionality in the
* Spring cache management facilities.

View File

@ -1,9 +1,8 @@
/**
*
* Support package for declarative caching configuration,
* with XML schema being the primary configuration format.
*
* Support package for declarative caching configuration, with XML
* schema being the primary configuration format. See {@link
* org.springframework.cache.annotation.EnableCaching EnableCaching}
* for details on code-based configuration without XML.
*/
package org.springframework.cache.config;

View File

@ -31,18 +31,21 @@ import org.springframework.util.ObjectUtils;
/**
* Abstract implementation of {@link CacheOperation} that caches
* attributes for methods and implements a fallback policy: 1. specific target
* method; 2. target class; 3. declaring method; 4. declaring class/interface.
* attributes for methods and implements a fallback policy: 1. specific
* target method; 2. target class; 3. declaring method; 4. declaring
* class/interface.
*
* <p>Defaults to using the target class's caching attribute if none is
* associated with the target method. Any caching attribute associated with
* the target method completely overrides a class caching attribute.
* If none found on the target class, the interface that the invoked method
* has been called through (in case of a JDK proxy) will be checked.
* associated with the target method. Any caching attribute associated
* with the target method completely overrides a class caching attribute.
* If none found on the target class, the interface that the invoked
* method has been called through (in case of a JDK proxy) will be
* checked.
*
* <p>This implementation caches attributes by method after they are first used.
* If it is ever desirable to allow dynamic changing of cacheable attributes
* (which is very unlikely), caching could be made configurable.
* <p>This implementation caches attributes by method after they are
* first used. If it is ever desirable to allow dynamic changing of
* cacheable attributes (which is very unlikely), caching could be made
* configurable.
*
* @author Costin Leau
* @since 3.1
@ -73,9 +76,9 @@ public abstract class AbstractFallbackCacheOperationSource implements CacheOpera
/**
* Determine the caching attribute for this method invocation.
* <p>Defaults to the class's caching attribute if no method attribute is found.
* @param method the method for the current invocation (never <code>null</code>)
* @param targetClass the target class for this invocation (may be <code>null</code>)
* @return {@link CacheOperation} for this method, or <code>null</code> if the method
* @param method the method for the current invocation (never {@code null})
* @param targetClass the target class for this invocation (may be {@code null})
* @return {@link CacheOperation} for this method, or {@code null} if the method
* is not cacheable
*/
public Collection<CacheOperation> getCacheOperations(Method method, Class<?> targetClass) {
@ -111,9 +114,9 @@ public abstract class AbstractFallbackCacheOperationSource implements CacheOpera
* Determine a cache key for the given method and target class.
* <p>Must not produce same key for overloaded methods.
* Must produce same key for different instances of the same method.
* @param method the method (never <code>null</code>)
* @param targetClass the target class (may be <code>null</code>)
* @return the cache key (never <code>null</code>)
* @param method the method (never {@code null})
* @param targetClass the target class (may be {@code null})
* @return the cache key (never {@code null})
*/
protected Object getCacheKey(Method method, Class<?> targetClass) {
return new DefaultCacheKey(method, targetClass);
@ -161,7 +164,7 @@ public abstract class AbstractFallbackCacheOperationSource implements CacheOpera
* for the given method, if any.
* @param method the method to retrieve the attribute for
* @return all caching attribute associated with this method
* (or <code>null</code> if none)
* (or {@code null} if none)
*/
protected abstract Collection<CacheOperation> findCacheOperations(Method method);
@ -170,13 +173,13 @@ public abstract class AbstractFallbackCacheOperationSource implements CacheOpera
* for the given class, if any.
* @param clazz the class to retrieve the attribute for
* @return all caching attribute associated with this class
* (or <code>null</code> if none)
* (or {@code null} if none)
*/
protected abstract Collection<CacheOperation> findCacheOperations(Class<?> clazz);
/**
* Should only public methods be allowed to have caching semantics?
* <p>The default implementation returns <code>false</code>.
* <p>The default implementation returns {@code false}.
*/
protected boolean allowPublicMethodsOnly() {
return false;

View File

@ -39,14 +39,16 @@ import org.springframework.util.StringUtils;
* Base class for caching aspects, such as the {@link CacheInterceptor}
* or an AspectJ aspect.
*
* <p>This enables the underlying Spring caching infrastructure to be used easily
* to implement an aspect for any aspect system.
* <p>This enables the underlying Spring caching infrastructure to be
* used easily to implement an aspect for any aspect system.
*
* <p>Subclasses are responsible for calling methods in this class in the correct order.
* <p>Subclasses are responsible for calling methods in this class in
* the correct order.
*
* <p>Uses the <b>Strategy</b> design pattern. A {@link CacheManager} implementation will
* perform the actual cache management, and a {@link CacheOperationSource} is used for
* determining caching operation definitions.
* <p>Uses the <b>Strategy</b> design pattern. A {@link CacheManager}
* implementation will perform the actual cache management, and a
* {@link CacheOperationSource} is used for determining caching
* operation definitions.
*
* <p>A cache aspect is serializable if its {@code CacheManager} and
* {@code CacheOperationSource} are serializable.

View File

@ -80,7 +80,7 @@ public abstract class CacheOperation {
}
/**
* This implementation compares the <code>toString()</code> results.
* This implementation compares the {@code toString()} results.
* @see #toString()
*/
@Override
@ -89,7 +89,7 @@ public abstract class CacheOperation {
}
/**
* This implementation returns <code>toString()</code>'s hash code.
* This implementation returns {@code toString()}'s hash code.
* @see #toString()
*/
@Override
@ -99,8 +99,8 @@ public abstract class CacheOperation {
/**
* Return an identifying description for this cache operation.
* <p>Has to be overridden in subclasses for correct <code>equals</code>
* and <code>hashCode</code> behavior. Alternatively, {@link #equals}
* <p>Has to be overridden in subclasses for correct {@code equals}
* and {@code hashCode} behavior. Alternatively, {@link #equals}
* and {@link #hashCode} can be overridden themselves.
*/
@Override
@ -110,7 +110,7 @@ public abstract class CacheOperation {
/**
* Return an identifying description for this caching operation.
* <p>Available to subclasses, for inclusion in their <code>toString()</code> result.
* <p>Available to subclasses, for inclusion in their {@code toString()} result.
*/
protected StringBuilder getOperationDescription() {
StringBuilder result = new StringBuilder();

View File

@ -31,12 +31,12 @@ public interface CacheOperationSource {
/**
* Return the cache operation definition for this method,
* or <code>null</code> if the method contains no "cacheable" annotations.
* or {@code null} if the method contains no "cacheable" annotations.
* @param method the method to introspect
* @param targetClass the target class (may be <code>null</code>,
* @param targetClass the target class (may be {@code null},
* in which case the declaring class of the method must be used)
* @return {@link CacheOperation} the matching cache operation,
* or <code>null</code> if none found
* or {@code null} if none found
*/
Collection<CacheOperation> getCacheOperations(Method method, Class<?> targetClass);

View File

@ -63,7 +63,7 @@ abstract class CacheOperationSourcePointcut extends StaticMethodMatcherPointcut
/**
* Obtain the underlying CacheOperationDefinitionSource (may be <code>null</code>).
* Obtain the underlying CacheOperationDefinitionSource (may be {@code null}).
* To be implemented by subclasses.
*/
protected abstract CacheOperationSource getCacheOperationSource();

View File

@ -1,5 +1,5 @@
/*
* Copyright 2011 the original author or authors.
* Copyright 2002-2011 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.

View File

@ -21,9 +21,10 @@ import java.lang.reflect.Method;
import org.springframework.cache.interceptor.KeyGenerator;
/**
* Default key generator. Returns {@value #NO_PARAM_KEY} if no parameters are provided,
* the parameter itself if only one is given or a hash code computed from all given
* parameters' hash code values. Uses the constant value {@value #NULL_PARAM_KEY} for any
* Default key generator. Returns {@value #NO_PARAM_KEY} if no
* parameters are provided, the parameter itself if only one is given or
* a hash code computed from all given parameters' hash code values.
* Uses the constant value {@value #NULL_PARAM_KEY} for any
* {@code null} parameters given.
*
* @author Costin Leau

View File

@ -25,12 +25,12 @@ import org.springframework.expression.spel.support.StandardEvaluationContext;
import org.springframework.util.ObjectUtils;
/**
* Evaluation context class that adds a method parameters as SpEL variables,
* in a lazy manner. The lazy nature eliminates unneeded parsing of classes
* byte code for parameter discovery.
* Evaluation context class that adds a method parameters as SpEL
* variables, in a lazy manner. The lazy nature eliminates unneeded
* parsing of classes byte code for parameter discovery.
*
* <p>To limit the creation of objects, an ugly constructor is used (rather then
* a dedicated 'closure'-like class for deferred execution).
* <p>To limit the creation of objects, an ugly constructor is used
* (rather then a dedicated 'closure'-like class for deferred execution).
*
* @author Costin Leau
* @since 3.1

View File

@ -1,8 +1,6 @@
/**
* AOP-based solution for declarative caching demarcation.
* Builds on the AOP infrastructure in org.springframework.aop.framework.
* Any POJO can be cache advised with Spring.
*
* Any POJO can be cache-advised with Spring.
*/
package org.springframework.cache.interceptor;

View File

@ -1,7 +1,5 @@
/**
* Spring's generic cache abstraction.
* Concrete implementations are provided in the subpackages.
*
*/
package org.springframework.cache;

View File

@ -29,8 +29,9 @@ import org.springframework.cache.CacheManager;
import org.springframework.util.Assert;
/**
* Abstract base class implementing the common CacheManager methods.
* Useful for 'static' environments where the backing caches do not change.
* Abstract base class implementing the common {@link CacheManager}
* methods. Useful for 'static' environments where the backing caches do
* not change.
*
* @author Costin Leau
* @author Juergen Hoeller

View File

@ -52,8 +52,8 @@ public class CompositeCacheManager implements InitializingBean, CacheManager {
/**
* Indicate whether a {@link NoOpCacheManager} should be added at the end of the manager lists.
* In this case, any <code>getCache</code> requests not handled by the configured cache managers will
* be automatically handled by the {@link NoOpCacheManager} (and hence never return <code>null</code>).
* In this case, any {@code getCache} requests not handled by the configured cache managers will
* be automatically handled by the {@link NoOpCacheManager} (and hence never return {@code null}).
*/
public void setFallbackToNoOpCache(boolean fallbackToNoOpCache) {
this.fallbackToNoOpCache = fallbackToNoOpCache;

View File

@ -27,8 +27,9 @@ import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
/**
* A basic, no operation {@link CacheManager} implementation suitable for disabling caching,
* typically used for backing cache declarations without an actual backing store.
* A basic, no operation {@link CacheManager} implementation suitable
* for disabling caching, typically used for backing cache declarations
* without an actual backing store.
*
* <p>Will simply accept any items into the cache not actually storing them.
*

View File

@ -3,4 +3,3 @@
* Provides abstract classes for cache managers and caches.
*/
package org.springframework.cache.support;