Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
4ff1e3e7
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4ff1e3e7
编写于
7月 01, 2018
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Consistent abstract declaration for utility classes (plus polishing)
Issue: SPR-16968
上级
e72f4ec5
变更
21
显示空白变更内容
内联
并排
Showing
21 changed file
with
31 addition
and
77 deletion
+31
-77
spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java
...main/java/org/springframework/beans/ExtendedBeanInfo.java
+14
-10
spring-beans/src/main/java/org/springframework/beans/PropertyDescriptorUtils.java
...va/org/springframework/beans/PropertyDescriptorUtils.java
+2
-9
spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionReaderUtils.java
...work/beans/factory/support/BeanDefinitionReaderUtils.java
+1
-5
spring-context/src/main/java/org/springframework/cache/config/CacheManagementConfigUtils.java
...ingframework/cache/config/CacheManagementConfigUtils.java
+1
-5
spring-context/src/main/java/org/springframework/context/annotation/BeanAnnotationHelper.java
...ingframework/context/annotation/BeanAnnotationHelper.java
+0
-1
spring-context/src/main/java/org/springframework/context/annotation/ScopedProxyCreator.java
...pringframework/context/annotation/ScopedProxyCreator.java
+0
-1
spring-context/src/main/java/org/springframework/context/support/PostProcessorRegistrationDelegate.java
...rk/context/support/PostProcessorRegistrationDelegate.java
+1
-2
spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeConverters.java
...ingframework/format/datetime/joda/JodaTimeConverters.java
+0
-1
spring-context/src/main/java/org/springframework/format/datetime/standard/DateTimeConverters.java
...ramework/format/datetime/standard/DateTimeConverters.java
+0
-1
spring-context/src/main/java/org/springframework/jmx/support/ObjectNameManager.java
...va/org/springframework/jmx/support/ObjectNameManager.java
+0
-1
spring-context/src/main/java/org/springframework/scheduling/config/TaskManagementConfigUtils.java
...ramework/scheduling/config/TaskManagementConfigUtils.java
+1
-6
spring-core/src/main/java/org/springframework/core/SpringVersion.java
...src/main/java/org/springframework/core/SpringVersion.java
+1
-2
spring-core/src/main/java/org/springframework/core/env/ProfilesParser.java
...ain/java/org/springframework/core/env/ProfilesParser.java
+5
-1
spring-jdbc/src/main/java/org/springframework/jdbc/config/DatabasePopulatorConfigUtils.java
...ngframework/jdbc/config/DatabasePopulatorConfigUtils.java
+1
-6
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseConfigurerFactory.java
...atasource/embedded/EmbeddedDatabaseConfigurerFactory.java
+0
-1
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/OutputStreamFactory.java
...amework/jdbc/datasource/embedded/OutputStreamFactory.java
+0
-1
spring-test/src/main/java/org/springframework/test/annotation/TestAnnotationUtils.java
.../springframework/test/annotation/TestAnnotationUtils.java
+1
-6
spring-test/src/main/java/org/springframework/test/jdbc/JdbcTestUtils.java
...ain/java/org/springframework/test/jdbc/JdbcTestUtils.java
+1
-5
spring-test/src/main/java/org/springframework/test/web/servlet/setup/MockMvcBuilders.java
...ringframework/test/web/servlet/setup/MockMvcBuilders.java
+0
-1
spring-web/src/main/java/org/springframework/web/util/JavaScriptUtils.java
...in/java/org/springframework/web/util/JavaScriptUtils.java
+1
-6
spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketNamespaceUtils.java
...gframework/web/socket/config/WebSocketNamespaceUtils.java
+1
-6
未找到文件。
spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java
浏览文件 @
4ff1e3e7
...
...
@@ -43,8 +43,10 @@ import org.springframework.util.ObjectUtils;
* Decorator for a standard {@link BeanInfo} object, e.g. as created by
* {@link Introspector#getBeanInfo(Class)}, designed to discover and register static
* and/or non-void returning setter methods. For example:
*
* <pre class="code">
* public class Bean {
*
* private Foo foo;
*
* public Foo getFoo() {
...
...
@@ -56,6 +58,7 @@ import org.springframework.util.ObjectUtils;
* return this;
* }
* }</pre>
*
* The standard JavaBeans {@code Introspector} will discover the {@code getFoo} read
* method, but will bypass the {@code #setFoo(Foo)} write method, because its non-void
* returning signature does not comply with the JavaBeans specification.
...
...
@@ -68,6 +71,7 @@ import org.springframework.util.ObjectUtils;
* indexed properties</a> are fully supported.
*
* @author Chris Beams
* @author Juergen Hoeller
* @since 3.1
* @see #ExtendedBeanInfo(BeanInfo)
* @see ExtendedBeanInfoFactory
...
...
@@ -79,8 +83,7 @@ class ExtendedBeanInfo implements BeanInfo {
private
final
BeanInfo
delegate
;
private
final
Set
<
PropertyDescriptor
>
propertyDescriptors
=
new
TreeSet
<>(
new
PropertyDescriptorComparator
());
private
final
Set
<
PropertyDescriptor
>
propertyDescriptors
=
new
TreeSet
<>(
new
PropertyDescriptorComparator
());
/**
...
...
@@ -91,11 +94,9 @@ class ExtendedBeanInfo implements BeanInfo {
* through its method descriptors to find any non-void returning write methods and
* update or create the corresponding {@link PropertyDescriptor} for each one found.
* @param delegate the wrapped {@code BeanInfo}, which is never modified
* @throws IntrospectionException if any problems occur creating and adding new
* property descriptors
* @see #getPropertyDescriptors()
*/
public
ExtendedBeanInfo
(
BeanInfo
delegate
)
throws
IntrospectionException
{
public
ExtendedBeanInfo
(
BeanInfo
delegate
)
{
this
.
delegate
=
delegate
;
for
(
PropertyDescriptor
pd
:
delegate
.
getPropertyDescriptors
())
{
try
{
...
...
@@ -214,8 +215,8 @@ class ExtendedBeanInfo implements BeanInfo {
/**
* Return the set of {@link PropertyDescriptor PropertyDescriptors} from the wrapped
* {@link BeanInfo} object as well as {@code PropertyDescriptor
BeanInfo} object as well as {@code PropertyDescriptors}
*
for each non-void
returning setter method found during construction.
* {@link BeanInfo} object as well as {@code PropertyDescriptor
s} for each non-void
* returning setter method found during construction.
* @see #ExtendedBeanInfo(BeanInfo)
*/
@Override
...
...
@@ -281,7 +282,9 @@ class ExtendedBeanInfo implements BeanInfo {
PropertyDescriptorUtils
.
copyNonMethodProperties
(
original
,
this
);
}
public
SimplePropertyDescriptor
(
String
propertyName
,
@Nullable
Method
readMethod
,
Method
writeMethod
)
throws
IntrospectionException
{
public
SimplePropertyDescriptor
(
String
propertyName
,
@Nullable
Method
readMethod
,
Method
writeMethod
)
throws
IntrospectionException
{
super
(
propertyName
,
null
,
null
);
this
.
readMethod
=
readMethod
;
this
.
writeMethod
=
writeMethod
;
...
...
@@ -385,8 +388,9 @@ class ExtendedBeanInfo implements BeanInfo {
PropertyDescriptorUtils
.
copyNonMethodProperties
(
original
,
this
);
}
public
SimpleIndexedPropertyDescriptor
(
String
propertyName
,
@Nullable
Method
readMethod
,
@Nullable
Method
writeMethod
,
@Nullable
Method
indexedReadMethod
,
Method
indexedWriteMethod
)
throws
IntrospectionException
{
public
SimpleIndexedPropertyDescriptor
(
String
propertyName
,
@Nullable
Method
readMethod
,
@Nullable
Method
writeMethod
,
@Nullable
Method
indexedReadMethod
,
Method
indexedWriteMethod
)
throws
IntrospectionException
{
super
(
propertyName
,
null
,
null
,
null
,
null
);
this
.
readMethod
=
readMethod
;
...
...
spring-beans/src/main/java/org/springframework/beans/PropertyDescriptorUtils.java
浏览文件 @
4ff1e3e7
...
...
@@ -30,19 +30,12 @@ import org.springframework.util.ObjectUtils;
* @author Chris Beams
* @author Juergen Hoeller
*/
final
class
PropertyDescriptorUtils
{
private
PropertyDescriptorUtils
()
{
}
abstract
class
PropertyDescriptorUtils
{
/**
* See {@link java.beans.FeatureDescriptor}.
*/
public
static
void
copyNonMethodProperties
(
PropertyDescriptor
source
,
PropertyDescriptor
target
)
throws
IntrospectionException
{
public
static
void
copyNonMethodProperties
(
PropertyDescriptor
source
,
PropertyDescriptor
target
)
{
target
.
setExpert
(
source
.
isExpert
());
target
.
setHidden
(
source
.
isHidden
());
target
.
setPreferred
(
source
.
isPreferred
());
...
...
spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionReaderUtils.java
浏览文件 @
4ff1e3e7
...
...
@@ -35,7 +35,7 @@ import org.springframework.util.StringUtils;
* @see PropertiesBeanDefinitionReader
* @see org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader
*/
public
final
class
BeanDefinitionReaderUtils
{
public
abstract
class
BeanDefinitionReaderUtils
{
/**
* Separator for generated bean names. If a class name or parent name is not
...
...
@@ -44,10 +44,6 @@ public final class BeanDefinitionReaderUtils {
public
static
final
String
GENERATED_BEAN_NAME_SEPARATOR
=
BeanFactoryUtils
.
GENERATED_BEAN_NAME_SEPARATOR
;
private
BeanDefinitionReaderUtils
()
{
}
/**
* Create a new GenericBeanDefinition for the given parent name and class name,
* eagerly loading the bean class if a ClassLoader has been specified.
...
...
spring-context/src/main/java/org/springframework/cache/config/CacheManagementConfigUtils.java
浏览文件 @
4ff1e3e7
...
...
@@ -22,7 +22,7 @@ package org.springframework.cache.config;
* @author Juergen Hoeller
* @since 4.1
*/
public
final
class
CacheManagementConfigUtils
{
public
abstract
class
CacheManagementConfigUtils
{
/**
* The name of the cache advisor bean.
...
...
@@ -48,8 +48,4 @@ public final class CacheManagementConfigUtils {
public
static
final
String
JCACHE_ASPECT_BEAN_NAME
=
"org.springframework.cache.config.internalJCacheAspect"
;
private
CacheManagementConfigUtils
()
{
}
}
spring-context/src/main/java/org/springframework/context/annotation/BeanAnnotationHelper.java
浏览文件 @
4ff1e3e7
...
...
@@ -29,7 +29,6 @@ import org.springframework.core.annotation.AnnotatedElementUtils;
*/
final
class
BeanAnnotationHelper
{
private
BeanAnnotationHelper
()
{
}
...
...
spring-context/src/main/java/org/springframework/context/annotation/ScopedProxyCreator.java
浏览文件 @
4ff1e3e7
...
...
@@ -30,7 +30,6 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
*/
final
class
ScopedProxyCreator
{
private
ScopedProxyCreator
()
{
}
...
...
spring-context/src/main/java/org/springframework/context/support/PostProcessorRegistrationDelegate.java
浏览文件 @
4ff1e3e7
...
...
@@ -49,7 +49,6 @@ import org.springframework.lang.Nullable;
*/
final
class
PostProcessorRegistrationDelegate
{
private
PostProcessorRegistrationDelegate
()
{
}
...
...
@@ -306,7 +305,7 @@ final class PostProcessorRegistrationDelegate {
* BeanPostProcessor instantiation, i.e. when a bean is not eligible for
* getting processed by all BeanPostProcessors.
*/
private
static
class
BeanPostProcessorChecker
implements
BeanPostProcessor
{
private
static
final
class
BeanPostProcessorChecker
implements
BeanPostProcessor
{
private
static
final
Log
logger
=
LogFactory
.
getLog
(
BeanPostProcessorChecker
.
class
);
...
...
spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeConverters.java
浏览文件 @
4ff1e3e7
...
...
@@ -46,7 +46,6 @@ import org.springframework.format.datetime.DateFormatterRegistrar;
*/
final
class
JodaTimeConverters
{
private
JodaTimeConverters
()
{
}
...
...
spring-context/src/main/java/org/springframework/format/datetime/standard/DateTimeConverters.java
浏览文件 @
4ff1e3e7
...
...
@@ -43,7 +43,6 @@ import org.springframework.format.datetime.DateFormatterRegistrar;
*/
final
class
DateTimeConverters
{
private
DateTimeConverters
()
{
}
...
...
spring-context/src/main/java/org/springframework/jmx/support/ObjectNameManager.java
浏览文件 @
4ff1e3e7
...
...
@@ -30,7 +30,6 @@ import javax.management.ObjectName;
*/
public
final
class
ObjectNameManager
{
private
ObjectNameManager
()
{
}
...
...
spring-context/src/main/java/org/springframework/scheduling/config/TaskManagementConfigUtils.java
浏览文件 @
4ff1e3e7
...
...
@@ -22,7 +22,7 @@ package org.springframework.scheduling.config;
* @author Juergen Hoeller
* @since 4.1
*/
public
final
class
TaskManagementConfigUtils
{
public
abstract
class
TaskManagementConfigUtils
{
/**
* The bean name of the internally managed Scheduled annotation processor.
...
...
@@ -42,9 +42,4 @@ public final class TaskManagementConfigUtils {
public
static
final
String
ASYNC_EXECUTION_ASPECT_BEAN_NAME
=
"org.springframework.scheduling.config.internalAsyncExecutionAspect"
;
private
TaskManagementConfigUtils
()
{
}
}
spring-core/src/main/java/org/springframework/core/SpringVersion.java
浏览文件 @
4ff1e3e7
...
...
@@ -25,7 +25,7 @@ import org.springframework.lang.Nullable;
* <p>Note that some ClassLoaders do not expose the package metadata,
* hence this class might not be able to determine the Spring version
* in all environments. Consider using a reflection-based check instead:
* For example, checking for the presence of a specific Spring
2
.0
* For example, checking for the presence of a specific Spring
5
.0
* method that you intend to call.
*
* @author Juergen Hoeller
...
...
@@ -33,7 +33,6 @@ import org.springframework.lang.Nullable;
*/
public
final
class
SpringVersion
{
private
SpringVersion
()
{
}
...
...
spring-core/src/main/java/org/springframework/core/env/ProfilesParser.java
浏览文件 @
4ff1e3e7
...
...
@@ -32,7 +32,11 @@ import org.springframework.util.StringUtils;
* @author Phillip Webb
* @since 5.1
*/
abstract
class
ProfilesParser
{
final
class
ProfilesParser
{
private
ProfilesParser
()
{
}
static
Profiles
parse
(
String
...
expressions
)
{
Assert
.
notEmpty
(
expressions
,
"Must specify at least one profile"
);
...
...
spring-jdbc/src/main/java/org/springframework/jdbc/config/DatabasePopulatorConfigUtils.java
浏览文件 @
4ff1e3e7
...
...
@@ -38,12 +38,7 @@ import org.springframework.util.xml.DomUtils;
* @author Stephane Nicoll
* @since 3.1
*/
final
class
DatabasePopulatorConfigUtils
{
private
DatabasePopulatorConfigUtils
()
{
}
abstract
class
DatabasePopulatorConfigUtils
{
public
static
void
setDatabasePopulator
(
Element
element
,
BeanDefinitionBuilder
builder
)
{
List
<
Element
>
scripts
=
DomUtils
.
getChildElementsByTagName
(
element
,
"script"
);
...
...
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseConfigurerFactory.java
浏览文件 @
4ff1e3e7
...
...
@@ -29,7 +29,6 @@ import org.springframework.util.Assert;
*/
final
class
EmbeddedDatabaseConfigurerFactory
{
private
EmbeddedDatabaseConfigurerFactory
()
{
}
...
...
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/OutputStreamFactory.java
浏览文件 @
4ff1e3e7
...
...
@@ -28,7 +28,6 @@ import java.io.OutputStream;
*/
public
final
class
OutputStreamFactory
{
private
OutputStreamFactory
()
{
}
...
...
spring-test/src/main/java/org/springframework/test/annotation/TestAnnotationUtils.java
浏览文件 @
4ff1e3e7
...
...
@@ -26,12 +26,7 @@ import org.springframework.core.annotation.AnnotatedElementUtils;
* @author Sam Brannen
* @since 4.2
*/
public
final
class
TestAnnotationUtils
{
private
TestAnnotationUtils
()
{
}
public
abstract
class
TestAnnotationUtils
{
/**
* Get the {@code timeout} configured via the {@link Timed @Timed}
...
...
spring-test/src/main/java/org/springframework/test/jdbc/JdbcTestUtils.java
浏览文件 @
4ff1e3e7
...
...
@@ -38,15 +38,11 @@ import org.springframework.util.StringUtils;
* @see org.springframework.jdbc.datasource.init.ResourceDatabasePopulator
* @see org.springframework.jdbc.datasource.init.DatabasePopulatorUtils
*/
public
final
class
JdbcTestUtils
{
public
abstract
class
JdbcTestUtils
{
private
static
final
Log
logger
=
LogFactory
.
getLog
(
JdbcTestUtils
.
class
);
private
JdbcTestUtils
()
{
}
/**
* Count the rows in the given table.
* @param jdbcTemplate the JdbcTemplate with which to perform JDBC operations
...
...
spring-test/src/main/java/org/springframework/test/web/servlet/setup/MockMvcBuilders.java
浏览文件 @
4ff1e3e7
...
...
@@ -35,7 +35,6 @@ import org.springframework.web.context.WebApplicationContext;
*/
public
final
class
MockMvcBuilders
{
private
MockMvcBuilders
()
{
}
...
...
spring-web/src/main/java/org/springframework/web/util/JavaScriptUtils.java
浏览文件 @
4ff1e3e7
...
...
@@ -29,12 +29,7 @@ package org.springframework.web.util;
* @author Rossen Stoyanchev
* @since 1.1.1
*/
public
final
class
JavaScriptUtils
{
private
JavaScriptUtils
()
{
}
public
abstract
class
JavaScriptUtils
{
/**
* Turn JavaScript special characters into escaped characters.
...
...
spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketNamespaceUtils.java
浏览文件 @
4ff1e3e7
...
...
@@ -44,12 +44,7 @@ import org.springframework.web.socket.sockjs.transport.handler.WebSocketTranspor
* @author Rossen Stoyanchev
* @since 4.0
*/
final
class
WebSocketNamespaceUtils
{
private
WebSocketNamespaceUtils
()
{
}
abstract
class
WebSocketNamespaceUtils
{
public
static
RuntimeBeanReference
registerHandshakeHandler
(
Element
element
,
ParserContext
context
,
@Nullable
Object
source
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录