Consistent final declaration for static delegate classes
Issue: SPR-16968
This commit is contained in:
@@ -45,7 +45,11 @@ import org.springframework.util.ReflectionUtils;
|
||||
* @author Phillip Webb
|
||||
* @since 2.0
|
||||
*/
|
||||
public abstract class BridgeMethodResolver {
|
||||
public final class BridgeMethodResolver {
|
||||
|
||||
private BridgeMethodResolver() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Find the original method for the supplied {@link Method bridge Method}.
|
||||
|
||||
@@ -53,7 +53,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
* @author Sam Brannen
|
||||
* @since 1.1.1
|
||||
*/
|
||||
public abstract class CollectionFactory {
|
||||
public final class CollectionFactory {
|
||||
|
||||
private static final Set<Class<?>> approximableCollectionTypes = new HashSet<>();
|
||||
|
||||
@@ -85,6 +85,10 @@ public abstract class CollectionFactory {
|
||||
}
|
||||
|
||||
|
||||
private CollectionFactory() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine whether the given collection type is an <em>approximable</em> type,
|
||||
* i.e. a type that {@link #createApproximateCollection} can approximate.
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.util.ClassUtils;
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 2.0
|
||||
*/
|
||||
public abstract class Conventions {
|
||||
public final class Conventions {
|
||||
|
||||
/**
|
||||
* Suffix added to names when using arrays.
|
||||
@@ -42,6 +42,10 @@ public abstract class Conventions {
|
||||
private static final String PLURAL_SUFFIX = "List";
|
||||
|
||||
|
||||
private Conventions() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine the conventional variable name for the supplied {@code Object}
|
||||
* based on its concrete type. The convention used is to return the
|
||||
|
||||
@@ -41,13 +41,17 @@ import org.springframework.util.ConcurrentReferenceHashMap;
|
||||
* @author Phillip Webb
|
||||
* @since 2.5.2
|
||||
*/
|
||||
public abstract class GenericTypeResolver {
|
||||
public final class GenericTypeResolver {
|
||||
|
||||
/** Cache from Class to TypeVariable Map. */
|
||||
@SuppressWarnings("rawtypes")
|
||||
private static final Map<Class<?>, Map<TypeVariable, Type>> typeVariableCache = new ConcurrentReferenceHashMap<>();
|
||||
|
||||
|
||||
private GenericTypeResolver() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine the target type for the given generic parameter type.
|
||||
* @param methodParameter the method parameter specification
|
||||
@@ -86,7 +90,7 @@ public abstract class GenericTypeResolver {
|
||||
*/
|
||||
@Nullable
|
||||
public static Class<?> resolveReturnTypeArgument(Method method, Class<?> genericIfc) {
|
||||
Assert.notNull(method, "method must not be null");
|
||||
Assert.notNull(method, "Method must not be null");
|
||||
ResolvableType resolvableType = ResolvableType.forMethodReturnType(method).as(genericIfc);
|
||||
if (!resolvableType.hasGenerics() || resolvableType.getType() instanceof WildcardType) {
|
||||
return null;
|
||||
|
||||
@@ -38,7 +38,11 @@ import org.springframework.util.ReflectionUtils;
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.2.3
|
||||
*/
|
||||
public abstract class MethodIntrospector {
|
||||
public final class MethodIntrospector {
|
||||
|
||||
private MethodIntrospector() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Select methods on the given target type based on the lookup of associated metadata.
|
||||
|
||||
@@ -46,7 +46,7 @@ import org.springframework.lang.Nullable;
|
||||
* @see org.springframework.jdbc.core.StatementCreatorUtils#IGNORE_GETPARAMETERTYPE_PROPERTY_NAME
|
||||
* @see org.springframework.test.context.cache.ContextCache#MAX_CONTEXT_CACHE_SIZE_PROPERTY_NAME
|
||||
*/
|
||||
public abstract class SpringProperties {
|
||||
public final class SpringProperties {
|
||||
|
||||
private static final String PROPERTIES_RESOURCE_LOCATION = "spring.properties";
|
||||
|
||||
@@ -79,6 +79,10 @@ public abstract class SpringProperties {
|
||||
}
|
||||
|
||||
|
||||
private SpringProperties() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Programmatically set a local property, overriding an entry in the
|
||||
* {@code spring.properties} file (if any).
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 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,7 +33,11 @@ import org.springframework.lang.Nullable;
|
||||
* @author Chris Beams
|
||||
* @since 3.0
|
||||
*/
|
||||
public abstract class ConversionServiceFactory {
|
||||
public final class ConversionServiceFactory {
|
||||
|
||||
private ConversionServiceFactory() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register the given Converter objects with the given target ConverterRegistry.
|
||||
|
||||
@@ -60,7 +60,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Sam Brannen
|
||||
* @since 3.2
|
||||
*/
|
||||
public abstract class SpringFactoriesLoader {
|
||||
public final class SpringFactoriesLoader {
|
||||
|
||||
/**
|
||||
* The location to look for factories.
|
||||
@@ -74,6 +74,10 @@ public abstract class SpringFactoriesLoader {
|
||||
private static final Map<ClassLoader, MultiValueMap<String, String>> cache = new ConcurrentReferenceHashMap<>();
|
||||
|
||||
|
||||
private SpringFactoriesLoader() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load and instantiate the factory implementations of the given type from
|
||||
* {@value #FACTORIES_RESOURCE_LOCATION}, using the given class loader.
|
||||
|
||||
Reference in New Issue
Block a user