Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dk131072
spring-framework
提交
c8e5aa07
S
spring-framework
项目概览
dk131072
/
spring-framework
与 Fork 源项目一致
从无法访问的项目Fork
通知
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,发现更多精彩内容 >>
提交
c8e5aa07
编写于
10月 27, 2008
作者:
A
Arjen Poutsma
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added @Override annotations to beans module
上级
c07477da
变更
84
隐藏空白更改
内联
并排
Showing
84 changed file
with
211 addition
and
0 deletion
+211
-0
org.springframework.beans/src/main/java/org/springframework/beans/AbstractPropertyAccessor.java
...a/org/springframework/beans/AbstractPropertyAccessor.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/BeanMetadataAttribute.java
...java/org/springframework/beans/BeanMetadataAttribute.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/BeanMetadataAttributeAccessor.java
.../springframework/beans/BeanMetadataAttributeAccessor.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java
.../main/java/org/springframework/beans/BeanWrapperImpl.java
+5
-0
org.springframework.beans/src/main/java/org/springframework/beans/BeansException.java
...c/main/java/org/springframework/beans/BeansException.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java
...n/java/org/springframework/beans/DirectFieldAccessor.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java
...ngframework/beans/GenericTypeAwarePropertyDescriptor.java
+4
-0
org.springframework.beans/src/main/java/org/springframework/beans/MutablePropertyValues.java
...java/org/springframework/beans/MutablePropertyValues.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/PropertyBatchUpdateException.java
...g/springframework/beans/PropertyBatchUpdateException.java
+5
-0
org.springframework.beans/src/main/java/org/springframework/beans/PropertyValue.java
...rc/main/java/org/springframework/beans/PropertyValue.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/PropertyValuesEditor.java
.../java/org/springframework/beans/PropertyValuesEditor.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/BeanCreationException.java
.../springframework/beans/factory/BeanCreationException.java
+4
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/access/el/SimpleSpringBeanELResolver.java
...k/beans/factory/access/el/SimpleSpringBeanELResolver.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/access/el/SpringBeanELResolver.java
...amework/beans/factory/access/el/SpringBeanELResolver.java
+6
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
...tory/annotation/AutowiredAnnotationBeanPostProcessor.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/annotation/InitDestroyAnnotationBeanPostProcessor.java
...ry/annotation/InitDestroyAnnotationBeanPostProcessor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/annotation/InjectionMetadata.java
...framework/beans/factory/annotation/InjectionMetadata.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.java
...ctory/annotation/RequiredAnnotationBeanPostProcessor.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/BeanDefinitionHolder.java
...gframework/beans/factory/config/BeanDefinitionHolder.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/ConstructorArgumentValues.java
...ework/beans/factory/config/ConstructorArgumentValues.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/ListFactoryBean.java
...springframework/beans/factory/config/ListFactoryBean.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/MapFactoryBean.java
.../springframework/beans/factory/config/MapFactoryBean.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java
...ework/beans/factory/config/MethodInvokingFactoryBean.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBean.java
...eans/factory/config/ObjectFactoryCreatingFactoryBean.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/PreferencesPlaceholderConfigurer.java
...eans/factory/config/PreferencesPlaceholderConfigurer.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/PropertyOverrideConfigurer.java
...work/beans/factory/config/PropertyOverrideConfigurer.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java
...k/beans/factory/config/PropertyPlaceholderConfigurer.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java
...mework/beans/factory/config/RuntimeBeanNameReference.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java
...gframework/beans/factory/config/RuntimeBeanReference.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/SetFactoryBean.java
.../springframework/beans/factory/config/SetFactoryBean.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/TypedStringValue.java
...pringframework/beans/factory/config/TypedStringValue.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/AbstractComponentDefinition.java
...rk/beans/factory/parsing/AbstractComponentDefinition.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/BeanComponentDefinition.java
...mework/beans/factory/parsing/BeanComponentDefinition.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/BeanEntry.java
.../org/springframework/beans/factory/parsing/BeanEntry.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/ConstructorArgumentEntry.java
...ework/beans/factory/parsing/ConstructorArgumentEntry.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/ParseState.java
...org/springframework/beans/factory/parsing/ParseState.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/Problem.java
...va/org/springframework/beans/factory/parsing/Problem.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/PropertyEntry.java
.../springframework/beans/factory/parsing/PropertyEntry.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/QualifierEntry.java
...springframework/beans/factory/parsing/QualifierEntry.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/serviceloader/AbstractServiceLoaderBasedFactoryBean.java
.../serviceloader/AbstractServiceLoaderBasedFactoryBean.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/serviceloader/ServiceFactoryBean.java
...ework/beans/factory/serviceloader/ServiceFactoryBean.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/serviceloader/ServiceListFactoryBean.java
...k/beans/factory/serviceloader/ServiceListFactoryBean.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/serviceloader/ServiceLoaderFactoryBean.java
...beans/factory/serviceloader/ServiceLoaderFactoryBean.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java
...s/factory/support/AbstractAutowireCapableBeanFactory.java
+6
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java
...amework/beans/factory/support/AbstractBeanDefinition.java
+4
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java
...gframework/beans/factory/support/AbstractBeanFactory.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionResource.java
...amework/beans/factory/support/BeanDefinitionResource.java
+4
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java
...actory/support/CglibSubclassingInstantiationStrategy.java
+4
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/ChildBeanDefinition.java
...gframework/beans/factory/support/ChildBeanDefinition.java
+5
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
...ork/beans/factory/support/DefaultListableBeanFactory.java
+6
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java
...ork/beans/factory/support/FactoryBeanRegistrySupport.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/GenericBeanDefinition.java
...ramework/beans/factory/support/GenericBeanDefinition.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/LookupOverride.java
...springframework/beans/factory/support/LookupOverride.java
+4
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/MethodOverride.java
...springframework/beans/factory/support/MethodOverride.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/MethodOverrides.java
...pringframework/beans/factory/support/MethodOverrides.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/ReplaceOverride.java
...pringframework/beans/factory/support/ReplaceOverride.java
+4
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/RootBeanDefinition.java
...ngframework/beans/factory/support/RootBeanDefinition.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/xml/AbstractSimpleBeanDefinitionParser.java
...beans/factory/xml/AbstractSimpleBeanDefinitionParser.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/xml/AbstractSingleBeanDefinitionParser.java
...beans/factory/xml/AbstractSingleBeanDefinitionParser.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/xml/ResourceEntityResolver.java
...ngframework/beans/factory/xml/ResourceEntityResolver.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/factory/xml/UtilNamespaceHandler.java
...ringframework/beans/factory/xml/UtilNamespaceHandler.java
+14
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/ByteArrayPropertyEditor.java
...mework/beans/propertyeditors/ByteArrayPropertyEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CharArrayPropertyEditor.java
...mework/beans/propertyeditors/CharArrayPropertyEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CharacterEditor.java
...pringframework/beans/propertyeditors/CharacterEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CharsetEditor.java
.../springframework/beans/propertyeditors/CharsetEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/ClassArrayEditor.java
...ringframework/beans/propertyeditors/ClassArrayEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/ClassEditor.java
...rg/springframework/beans/propertyeditors/ClassEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CustomBooleanEditor.java
...gframework/beans/propertyeditors/CustomBooleanEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CustomCollectionEditor.java
...amework/beans/propertyeditors/CustomCollectionEditor.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CustomDateEditor.java
...ringframework/beans/propertyeditors/CustomDateEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CustomMapEditor.java
...pringframework/beans/propertyeditors/CustomMapEditor.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CustomNumberEditor.java
...ngframework/beans/propertyeditors/CustomNumberEditor.java
+3
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/FileEditor.java
...org/springframework/beans/propertyeditors/FileEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/InputStreamEditor.java
...ingframework/beans/propertyeditors/InputStreamEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/LocaleEditor.java
...g/springframework/beans/propertyeditors/LocaleEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/PatternEditor.java
.../springframework/beans/propertyeditors/PatternEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/PropertiesEditor.java
...ringframework/beans/propertyeditors/PropertiesEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/ResourceBundleEditor.java
...framework/beans/propertyeditors/ResourceBundleEditor.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/StringArrayPropertyEditor.java
...work/beans/propertyeditors/StringArrayPropertyEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/StringTrimmerEditor.java
...gframework/beans/propertyeditors/StringTrimmerEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/URIEditor.java
.../org/springframework/beans/propertyeditors/URIEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/URLEditor.java
.../org/springframework/beans/propertyeditors/URLEditor.java
+2
-0
org.springframework.beans/src/main/java/org/springframework/beans/support/ArgumentConvertingMethodInvoker.java
...mework/beans/support/ArgumentConvertingMethodInvoker.java
+1
-0
org.springframework.beans/src/main/java/org/springframework/beans/support/MutableSortDefinition.java
.../springframework/beans/support/MutableSortDefinition.java
+2
-0
未找到文件。
org.springframework.beans/src/main/java/org/springframework/beans/AbstractPropertyAccessor.java
浏览文件 @
c8e5aa07
...
...
@@ -111,6 +111,7 @@ public abstract class AbstractPropertyAccessor extends PropertyEditorRegistrySup
// Redefined with public visibility.
@Override
public
Class
getPropertyType
(
String
propertyPath
)
{
return
null
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/BeanMetadataAttribute.java
浏览文件 @
c8e5aa07
...
...
@@ -74,6 +74,7 @@ public class BeanMetadataAttribute implements BeanMetadataElement {
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -87,10 +88,12 @@ public class BeanMetadataAttribute implements BeanMetadataElement {
ObjectUtils
.
nullSafeEquals
(
this
.
source
,
otherMa
.
source
));
}
@Override
public
int
hashCode
()
{
return
this
.
name
.
hashCode
()
*
29
+
ObjectUtils
.
nullSafeHashCode
(
this
.
value
);
}
@Override
public
String
toString
()
{
return
"metadata attribute '"
+
this
.
name
+
"'"
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/BeanMetadataAttributeAccessor.java
浏览文件 @
c8e5aa07
...
...
@@ -62,15 +62,18 @@ public class BeanMetadataAttributeAccessor extends AttributeAccessorSupport impl
return
(
BeanMetadataAttribute
)
super
.
getAttribute
(
name
);
}
@Override
public
void
setAttribute
(
String
name
,
Object
value
)
{
super
.
setAttribute
(
name
,
new
BeanMetadataAttribute
(
name
,
value
));
}
@Override
public
Object
getAttribute
(
String
name
)
{
BeanMetadataAttribute
attribute
=
(
BeanMetadataAttribute
)
super
.
getAttribute
(
name
);
return
(
attribute
!=
null
?
attribute
.
getValue
()
:
null
);
}
@Override
public
Object
removeAttribute
(
String
name
)
{
BeanMetadataAttribute
attribute
=
(
BeanMetadataAttribute
)
super
.
removeAttribute
(
name
);
return
(
attribute
!=
null
?
attribute
.
getValue
()
:
null
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java
浏览文件 @
c8e5aa07
...
...
@@ -282,6 +282,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
return
nestedBw
.
getCachedIntrospectionResults
().
getPropertyDescriptor
(
getFinalPath
(
nestedBw
,
propertyName
));
}
@Override
public
Class
getPropertyType
(
String
propertyName
)
throws
BeansException
{
try
{
PropertyDescriptor
pd
=
getPropertyDescriptorInternal
(
propertyName
);
...
...
@@ -527,6 +528,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
// Implementation of PropertyAccessor interface
//---------------------------------------------------------------------
@Override
public
Object
getPropertyValue
(
String
propertyName
)
throws
BeansException
{
BeanWrapperImpl
nestedBw
=
getBeanWrapperForPropertyPath
(
propertyName
);
PropertyTokenHolder
tokens
=
getPropertyNameTokens
(
getFinalPath
(
nestedBw
,
propertyName
));
...
...
@@ -620,6 +622,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
}
}
@Override
public
void
setPropertyValue
(
String
propertyName
,
Object
value
)
throws
BeansException
{
BeanWrapperImpl
nestedBw
=
null
;
try
{
...
...
@@ -633,6 +636,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
nestedBw
.
setPropertyValue
(
tokens
,
new
PropertyValue
(
propertyName
,
value
));
}
@Override
public
void
setPropertyValue
(
PropertyValue
pv
)
throws
BeansException
{
PropertyTokenHolder
tokens
=
(
PropertyTokenHolder
)
pv
.
resolvedTokens
;
if
(
tokens
==
null
)
{
...
...
@@ -864,6 +868,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
}
@Override
public
String
toString
()
{
StringBuffer
sb
=
new
StringBuffer
(
getClass
().
getName
());
if
(
this
.
object
!=
null
)
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/BeansException.java
浏览文件 @
c8e5aa07
...
...
@@ -50,6 +50,7 @@ public abstract class BeansException extends NestedRuntimeException {
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -62,6 +63,7 @@ public abstract class BeansException extends NestedRuntimeException {
ObjectUtils
.
nullSafeEquals
(
getCause
(),
otherBe
.
getCause
()));
}
@Override
public
int
hashCode
()
{
return
getMessage
().
hashCode
();
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java
浏览文件 @
c8e5aa07
...
...
@@ -77,6 +77,7 @@ public class DirectFieldAccessor extends AbstractPropertyAccessor {
return
this
.
fieldMap
.
containsKey
(
propertyName
);
}
@Override
public
Class
getPropertyType
(
String
propertyName
)
throws
BeansException
{
Field
field
=
(
Field
)
this
.
fieldMap
.
get
(
propertyName
);
if
(
field
!=
null
)
{
...
...
@@ -85,6 +86,7 @@ public class DirectFieldAccessor extends AbstractPropertyAccessor {
return
null
;
}
@Override
public
Object
getPropertyValue
(
String
propertyName
)
throws
BeansException
{
Field
field
=
(
Field
)
this
.
fieldMap
.
get
(
propertyName
);
if
(
field
==
null
)
{
...
...
@@ -100,6 +102,7 @@ public class DirectFieldAccessor extends AbstractPropertyAccessor {
}
}
@Override
public
void
setPropertyValue
(
String
propertyName
,
Object
newValue
)
throws
BeansException
{
Field
field
=
(
Field
)
this
.
fieldMap
.
get
(
propertyName
);
if
(
field
==
null
)
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java
浏览文件 @
c8e5aa07
...
...
@@ -70,18 +70,22 @@ class GenericTypeAwarePropertyDescriptor extends PropertyDescriptor {
}
@Override
public
Method
getReadMethod
()
{
return
this
.
readMethod
;
}
@Override
public
Method
getWriteMethod
()
{
return
this
.
writeMethod
;
}
@Override
public
Class
getPropertyEditorClass
()
{
return
this
.
propertyEditorClass
;
}
@Override
public
synchronized
Class
getPropertyType
()
{
if
(
this
.
propertyType
==
null
)
{
if
(
this
.
readMethod
!=
null
)
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/MutablePropertyValues.java
浏览文件 @
c8e5aa07
...
...
@@ -325,6 +325,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -336,10 +337,12 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
return
this
.
propertyValueList
.
equals
(
that
.
propertyValueList
);
}
@Override
public
int
hashCode
()
{
return
this
.
propertyValueList
.
hashCode
();
}
@Override
public
String
toString
()
{
PropertyValue
[]
pvs
=
getPropertyValues
();
StringBuffer
sb
=
new
StringBuffer
(
"PropertyValues: length="
+
pvs
.
length
+
"; "
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/PropertyBatchUpdateException.java
浏览文件 @
c8e5aa07
...
...
@@ -80,6 +80,7 @@ public class PropertyBatchUpdateException extends BeansException {
}
@Override
public
String
getMessage
()
{
StringBuffer
sb
=
new
StringBuffer
(
"Failed properties: "
);
for
(
int
i
=
0
;
i
<
this
.
propertyAccessExceptions
.
length
;
i
++)
{
...
...
@@ -91,6 +92,7 @@ public class PropertyBatchUpdateException extends BeansException {
return
sb
.
toString
();
}
@Override
public
String
toString
()
{
StringBuffer
sb
=
new
StringBuffer
();
sb
.
append
(
getClass
().
getName
()).
append
(
"; nested PropertyAccessExceptions ("
);
...
...
@@ -102,6 +104,7 @@ public class PropertyBatchUpdateException extends BeansException {
return
sb
.
toString
();
}
@Override
public
void
printStackTrace
(
PrintStream
ps
)
{
synchronized
(
ps
)
{
ps
.
println
(
getClass
().
getName
()
+
"; nested PropertyAccessException details ("
+
...
...
@@ -113,6 +116,7 @@ public class PropertyBatchUpdateException extends BeansException {
}
}
@Override
public
void
printStackTrace
(
PrintWriter
pw
)
{
synchronized
(
pw
)
{
pw
.
println
(
getClass
().
getName
()
+
"; nested PropertyAccessException details ("
+
...
...
@@ -124,6 +128,7 @@ public class PropertyBatchUpdateException extends BeansException {
}
}
@Override
public
boolean
contains
(
Class
exType
)
{
if
(
exType
==
null
)
{
return
false
;
...
...
org.springframework.beans/src/main/java/org/springframework/beans/PropertyValue.java
浏览文件 @
c8e5aa07
...
...
@@ -160,6 +160,7 @@ public class PropertyValue extends BeanMetadataAttributeAccessor implements Seri
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -173,10 +174,12 @@ public class PropertyValue extends BeanMetadataAttributeAccessor implements Seri
ObjectUtils
.
nullSafeEquals
(
this
.
source
,
otherPv
.
source
));
}
@Override
public
int
hashCode
()
{
return
this
.
name
.
hashCode
()
*
29
+
ObjectUtils
.
nullSafeHashCode
(
this
.
value
);
}
@Override
public
String
toString
()
{
return
"bean property '"
+
this
.
name
+
"'"
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/PropertyValuesEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -38,6 +38,7 @@ public class PropertyValuesEditor extends PropertyEditorSupport {
private
final
PropertiesEditor
propertiesEditor
=
new
PropertiesEditor
();
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
this
.
propertiesEditor
.
setAsText
(
text
);
Properties
props
=
(
Properties
)
this
.
propertiesEditor
.
getValue
();
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/BeanCreationException.java
浏览文件 @
c8e5aa07
...
...
@@ -146,6 +146,7 @@ public class BeanCreationException extends FatalBeanException {
}
@Override
public
String
toString
()
{
StringBuffer
sb
=
new
StringBuffer
(
super
.
toString
());
if
(
this
.
relatedCauses
!=
null
)
{
...
...
@@ -158,6 +159,7 @@ public class BeanCreationException extends FatalBeanException {
return
sb
.
toString
();
}
@Override
public
void
printStackTrace
(
PrintStream
ps
)
{
synchronized
(
ps
)
{
super
.
printStackTrace
(
ps
);
...
...
@@ -171,6 +173,7 @@ public class BeanCreationException extends FatalBeanException {
}
}
@Override
public
void
printStackTrace
(
PrintWriter
pw
)
{
synchronized
(
pw
)
{
super
.
printStackTrace
(
pw
);
...
...
@@ -184,6 +187,7 @@ public class BeanCreationException extends FatalBeanException {
}
}
@Override
public
boolean
contains
(
Class
exClass
)
{
if
(
super
.
contains
(
exClass
))
{
return
true
;
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/access/el/SimpleSpringBeanELResolver.java
浏览文件 @
c8e5aa07
...
...
@@ -42,6 +42,7 @@ public class SimpleSpringBeanELResolver extends SpringBeanELResolver {
this
.
beanFactory
=
beanFactory
;
}
@Override
protected
BeanFactory
getBeanFactory
(
ELContext
elContext
)
{
return
this
.
beanFactory
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/access/el/SpringBeanELResolver.java
浏览文件 @
c8e5aa07
...
...
@@ -43,6 +43,7 @@ public abstract class SpringBeanELResolver extends ELResolver {
protected
final
Log
logger
=
LogFactory
.
getLog
(
getClass
());
@Override
public
Object
getValue
(
ELContext
elContext
,
Object
base
,
Object
property
)
throws
ELException
{
if
(
base
==
null
)
{
String
beanName
=
property
.
toString
();
...
...
@@ -58,6 +59,7 @@ public abstract class SpringBeanELResolver extends ELResolver {
return
null
;
}
@Override
public
Class
<?>
getType
(
ELContext
elContext
,
Object
base
,
Object
property
)
throws
ELException
{
if
(
base
==
null
)
{
String
beanName
=
property
.
toString
();
...
...
@@ -70,6 +72,7 @@ public abstract class SpringBeanELResolver extends ELResolver {
return
null
;
}
@Override
public
void
setValue
(
ELContext
elContext
,
Object
base
,
Object
property
,
Object
value
)
throws
ELException
{
if
(
base
==
null
)
{
String
beanName
=
property
.
toString
();
...
...
@@ -81,6 +84,7 @@ public abstract class SpringBeanELResolver extends ELResolver {
}
}
@Override
public
boolean
isReadOnly
(
ELContext
elContext
,
Object
base
,
Object
property
)
throws
ELException
{
if
(
base
==
null
)
{
String
beanName
=
property
.
toString
();
...
...
@@ -92,10 +96,12 @@ public abstract class SpringBeanELResolver extends ELResolver {
return
false
;
}
@Override
public
Iterator
<
FeatureDescriptor
>
getFeatureDescriptors
(
ELContext
elContext
,
Object
base
)
{
return
null
;
}
@Override
public
Class
<?>
getCommonPropertyType
(
ELContext
elContext
,
Object
base
)
{
return
Object
.
class
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
浏览文件 @
c8e5aa07
...
...
@@ -181,6 +181,7 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
}
}
@Override
public
Constructor
[]
determineCandidateConstructors
(
Class
beanClass
,
String
beanName
)
throws
BeansException
{
// Quick check on the concurrent map first, with minimal locking.
Constructor
[]
candidateConstructors
=
this
.
candidateConstructorsCache
.
get
(
beanClass
);
...
...
@@ -234,6 +235,7 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
return
(
candidateConstructors
.
length
>
0
?
candidateConstructors
:
null
);
}
@Override
public
boolean
postProcessAfterInstantiation
(
Object
bean
,
String
beanName
)
throws
BeansException
{
InjectionMetadata
metadata
=
findAutowiringMetadata
(
bean
.
getClass
());
try
{
...
...
@@ -245,6 +247,7 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
return
true
;
}
@Override
public
PropertyValues
postProcessPropertyValues
(
PropertyValues
pvs
,
PropertyDescriptor
[]
pds
,
Object
bean
,
String
beanName
)
throws
BeansException
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/annotation/InitDestroyAnnotationBeanPostProcessor.java
浏览文件 @
c8e5aa07
...
...
@@ -297,11 +297,13 @@ public class InitDestroyAnnotationBeanPostProcessor
this
.
method
.
invoke
(
target
,
(
Object
[])
null
);
}
@Override
public
boolean
equals
(
Object
other
)
{
return
(
this
==
other
||
(
other
instanceof
LifecycleElement
&&
this
.
method
.
getName
().
equals
(((
LifecycleElement
)
other
).
method
.
getName
())));
}
@Override
public
int
hashCode
()
{
return
this
.
method
.
getName
().
hashCode
();
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/annotation/InjectionMetadata.java
浏览文件 @
c8e5aa07
...
...
@@ -222,6 +222,7 @@ public class InjectionMetadata {
return
null
;
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -241,10 +242,12 @@ public class InjectionMetadata {
}
}
@Override
public
int
hashCode
()
{
return
this
.
member
.
getClass
().
hashCode
()
*
29
+
this
.
member
.
getName
().
hashCode
();
}
@Override
public
String
toString
()
{
return
getClass
().
getSimpleName
()
+
" for "
+
this
.
member
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.java
浏览文件 @
c8e5aa07
...
...
@@ -106,6 +106,7 @@ public class RequiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP
}
@Override
public
PropertyValues
postProcessPropertyValues
(
PropertyValues
pvs
,
PropertyDescriptor
[]
pds
,
Object
bean
,
String
beanName
)
throws
BeansException
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/BeanDefinitionHolder.java
浏览文件 @
c8e5aa07
...
...
@@ -145,11 +145,13 @@ public class BeanDefinitionHolder implements BeanMetadataElement {
* @see #getLongDescription()
* @see #getShortDescription()
*/
@Override
public
String
toString
()
{
return
getLongDescription
();
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -163,6 +165,7 @@ public class BeanDefinitionHolder implements BeanMetadataElement {
ObjectUtils
.
nullSafeEquals
(
this
.
aliases
,
otherHolder
.
aliases
);
}
@Override
public
int
hashCode
()
{
int
hashCode
=
this
.
beanDefinition
.
hashCode
();
hashCode
=
29
*
hashCode
+
this
.
beanName
.
hashCode
();
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/ConstructorArgumentValues.java
浏览文件 @
c8e5aa07
...
...
@@ -312,6 +312,7 @@ public class ConstructorArgumentValues {
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -344,6 +345,7 @@ public class ConstructorArgumentValues {
return
true
;
}
@Override
public
int
hashCode
()
{
int
hashCode
=
7
;
for
(
Iterator
it
=
this
.
genericArgumentValues
.
iterator
();
it
.
hasNext
();)
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/ListFactoryBean.java
浏览文件 @
c8e5aa07
...
...
@@ -65,10 +65,12 @@ public class ListFactoryBean extends AbstractFactoryBean {
}
@Override
public
Class
getObjectType
()
{
return
List
.
class
;
}
@Override
protected
Object
createInstance
()
{
if
(
this
.
sourceList
==
null
)
{
throw
new
IllegalArgumentException
(
"'sourceList' is required"
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/MapFactoryBean.java
浏览文件 @
c8e5aa07
...
...
@@ -65,10 +65,12 @@ public class MapFactoryBean extends AbstractFactoryBean {
}
@Override
public
Class
getObjectType
()
{
return
Map
.
class
;
}
@Override
protected
Object
createInstance
()
{
if
(
this
.
sourceMap
==
null
)
{
throw
new
IllegalArgumentException
(
"'sourceMap' is required"
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java
浏览文件 @
c8e5aa07
...
...
@@ -118,6 +118,7 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker
this
.
beanClassLoader
=
classLoader
;
}
@Override
protected
Class
resolveClassName
(
String
className
)
throws
ClassNotFoundException
{
return
ClassUtils
.
forName
(
className
,
this
.
beanClassLoader
);
}
...
...
@@ -133,6 +134,7 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker
* if possible.
* @see ConfigurableBeanFactory#getTypeConverter()
*/
@Override
protected
TypeConverter
getDefaultTypeConverter
()
{
if
(
this
.
beanFactory
!=
null
)
{
return
this
.
beanFactory
.
getTypeConverter
();
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBean.java
浏览文件 @
c8e5aa07
...
...
@@ -110,16 +110,19 @@ public class ObjectFactoryCreatingFactoryBean extends AbstractFactoryBean {
this
.
targetBeanName
=
targetBeanName
;
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
Assert
.
hasText
(
this
.
targetBeanName
,
"Property 'targetBeanName' is required"
);
super
.
afterPropertiesSet
();
}
@Override
public
Class
getObjectType
()
{
return
ObjectFactory
.
class
;
}
@Override
protected
Object
createInstance
()
{
return
new
ObjectFactory
()
{
public
Object
getObject
()
throws
BeansException
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/PreferencesPlaceholderConfigurer.java
浏览文件 @
c8e5aa07
...
...
@@ -86,6 +86,7 @@ public class PreferencesPlaceholderConfigurer extends PropertyPlaceholderConfigu
* in the user preferences, then in the system preferences, then in
* the passed-in properties.
*/
@Override
protected
String
resolvePlaceholder
(
String
placeholder
,
Properties
props
)
{
String
path
=
null
;
String
key
=
placeholder
;
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/PropertyOverrideConfigurer.java
浏览文件 @
c8e5aa07
...
...
@@ -93,6 +93,7 @@ public class PropertyOverrideConfigurer extends PropertyResourceConfigurer {
}
@Override
protected
void
processProperties
(
ConfigurableListableBeanFactory
beanFactory
,
Properties
props
)
throws
BeansException
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java
浏览文件 @
c8e5aa07
...
...
@@ -249,6 +249,7 @@ public class PropertyPlaceholderConfigurer extends PropertyResourceConfigurer
}
@Override
protected
void
processProperties
(
ConfigurableListableBeanFactory
beanFactoryToProcess
,
Properties
props
)
throws
BeansException
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java
浏览文件 @
c8e5aa07
...
...
@@ -61,6 +61,7 @@ public class RuntimeBeanNameReference implements BeanReference {
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -72,10 +73,12 @@ public class RuntimeBeanNameReference implements BeanReference {
return
this
.
beanName
.
equals
(
that
.
beanName
);
}
@Override
public
int
hashCode
()
{
return
this
.
beanName
.
hashCode
();
}
@Override
public
String
toString
()
{
return
'<'
+
getBeanName
()
+
'>'
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java
浏览文件 @
c8e5aa07
...
...
@@ -86,6 +86,7 @@ public class RuntimeBeanReference implements BeanReference {
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -97,12 +98,14 @@ public class RuntimeBeanReference implements BeanReference {
return
(
this
.
beanName
.
equals
(
that
.
beanName
)
&&
this
.
toParent
==
that
.
toParent
);
}
@Override
public
int
hashCode
()
{
int
result
=
this
.
beanName
.
hashCode
();
result
=
29
*
result
+
(
this
.
toParent
?
1
:
0
);
return
result
;
}
@Override
public
String
toString
()
{
return
'<'
+
getBeanName
()
+
'>'
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/SetFactoryBean.java
浏览文件 @
c8e5aa07
...
...
@@ -65,10 +65,12 @@ public class SetFactoryBean extends AbstractFactoryBean {
}
@Override
public
Class
getObjectType
()
{
return
Set
.
class
;
}
@Override
protected
Object
createInstance
()
{
if
(
this
.
sourceSet
==
null
)
{
throw
new
IllegalArgumentException
(
"'sourceSet' is required"
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/config/TypedStringValue.java
浏览文件 @
c8e5aa07
...
...
@@ -170,6 +170,7 @@ public class TypedStringValue implements BeanMetadataElement {
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -182,10 +183,12 @@ public class TypedStringValue implements BeanMetadataElement {
ObjectUtils
.
nullSafeEquals
(
this
.
targetType
,
otherValue
.
targetType
));
}
@Override
public
int
hashCode
()
{
return
ObjectUtils
.
nullSafeHashCode
(
this
.
value
)
*
29
+
ObjectUtils
.
nullSafeHashCode
(
this
.
targetType
);
}
@Override
public
String
toString
()
{
return
"TypedStringValue: value ["
+
this
.
value
+
"], target type ["
+
this
.
targetType
+
"]"
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/AbstractComponentDefinition.java
浏览文件 @
c8e5aa07
...
...
@@ -63,6 +63,7 @@ public abstract class AbstractComponentDefinition implements ComponentDefinition
/**
* Delegates to {@link #getDescription}.
*/
@Override
public
String
toString
()
{
return
getDescription
();
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/BeanComponentDefinition.java
浏览文件 @
c8e5aa07
...
...
@@ -119,6 +119,7 @@ public class BeanComponentDefinition extends BeanDefinitionHolder implements Com
* This implementation returns this ComponentDefinition's description.
* @see #getDescription()
*/
@Override
public
String
toString
()
{
return
getDescription
();
}
...
...
@@ -127,6 +128,7 @@ public class BeanComponentDefinition extends BeanDefinitionHolder implements Com
* This implementations expects the other object to be of type BeanComponentDefinition
* as well, in addition to the superclass's equality requirements.
*/
@Override
public
boolean
equals
(
Object
other
)
{
return
(
this
==
other
||
(
other
instanceof
BeanComponentDefinition
&&
super
.
equals
(
other
)));
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/BeanEntry.java
浏览文件 @
c8e5aa07
...
...
@@ -36,6 +36,7 @@ public class BeanEntry implements ParseState.Entry {
}
@Override
public
String
toString
()
{
return
"Bean '"
+
this
.
beanDefinitionName
+
"'"
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/ConstructorArgumentEntry.java
浏览文件 @
c8e5aa07
...
...
@@ -52,6 +52,7 @@ public class ConstructorArgumentEntry implements ParseState.Entry {
}
@Override
public
String
toString
()
{
return
"Constructor-arg"
+
(
this
.
index
>=
0
?
" #"
+
this
.
index
:
""
);
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/ParseState.java
浏览文件 @
c8e5aa07
...
...
@@ -93,6 +93,7 @@ public final class ParseState {
/**
* Returns a tree-style representation of the current <code>ParseState</code>.
*/
@Override
public
String
toString
()
{
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
x
=
0
;
x
<
this
.
state
.
size
();
x
++)
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/Problem.java
浏览文件 @
c8e5aa07
...
...
@@ -114,6 +114,7 @@ public class Problem {
}
@Override
public
String
toString
()
{
StringBuffer
sb
=
new
StringBuffer
();
sb
.
append
(
"Configuration problem: "
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/PropertyEntry.java
浏览文件 @
c8e5aa07
...
...
@@ -43,6 +43,7 @@ public class PropertyEntry implements ParseState.Entry {
}
@Override
public
String
toString
()
{
return
"Property '"
+
this
.
name
+
"'"
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/parsing/QualifierEntry.java
浏览文件 @
c8e5aa07
...
...
@@ -36,6 +36,7 @@ public class QualifierEntry implements ParseState.Entry {
this
.
typeName
=
typeName
;
}
@Override
public
String
toString
()
{
return
"Qualifier '"
+
this
.
typeName
+
"'"
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/serviceloader/AbstractServiceLoaderBasedFactoryBean.java
浏览文件 @
c8e5aa07
...
...
@@ -53,6 +53,7 @@ public abstract class AbstractServiceLoaderBasedFactoryBean extends AbstractFact
return
this
.
serviceType
;
}
@Override
public
void
setBeanClassLoader
(
ClassLoader
beanClassLoader
)
{
this
.
beanClassLoader
=
beanClassLoader
;
}
...
...
@@ -62,6 +63,7 @@ public abstract class AbstractServiceLoaderBasedFactoryBean extends AbstractFact
* Delegates to {@link #getObjectToExpose(java.util.ServiceLoader)}.
* @return the object to expose
*/
@Override
protected
Object
createInstance
()
{
Assert
.
notNull
(
getServiceType
(),
"Property 'serviceType' is required"
);
return
getObjectToExpose
(
ServiceLoader
.
load
(
getServiceType
(),
this
.
beanClassLoader
));
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/serviceloader/ServiceFactoryBean.java
浏览文件 @
c8e5aa07
...
...
@@ -32,6 +32,7 @@ import org.springframework.beans.factory.BeanClassLoaderAware;
*/
public
class
ServiceFactoryBean
extends
AbstractServiceLoaderBasedFactoryBean
implements
BeanClassLoaderAware
{
@Override
protected
Object
getObjectToExpose
(
ServiceLoader
serviceLoader
)
{
Iterator
it
=
serviceLoader
.
iterator
();
if
(!
it
.
hasNext
())
{
...
...
@@ -41,6 +42,7 @@ public class ServiceFactoryBean extends AbstractServiceLoaderBasedFactoryBean im
return
it
.
next
();
}
@Override
public
Class
getObjectType
()
{
return
getServiceType
();
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/serviceloader/ServiceListFactoryBean.java
浏览文件 @
c8e5aa07
...
...
@@ -34,6 +34,7 @@ import org.springframework.beans.factory.BeanClassLoaderAware;
*/
public
class
ServiceListFactoryBean
extends
AbstractServiceLoaderBasedFactoryBean
implements
BeanClassLoaderAware
{
@Override
protected
Object
getObjectToExpose
(
ServiceLoader
serviceLoader
)
{
List
result
=
new
LinkedList
();
Iterator
it
=
serviceLoader
.
iterator
();
...
...
@@ -43,6 +44,7 @@ public class ServiceListFactoryBean extends AbstractServiceLoaderBasedFactoryBea
return
result
;
}
@Override
public
Class
getObjectType
()
{
return
List
.
class
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/serviceloader/ServiceLoaderFactoryBean.java
浏览文件 @
c8e5aa07
...
...
@@ -30,10 +30,12 @@ import org.springframework.beans.factory.BeanClassLoaderAware;
*/
public
class
ServiceLoaderFactoryBean
extends
AbstractServiceLoaderBasedFactoryBean
implements
BeanClassLoaderAware
{
@Override
protected
Object
getObjectToExpose
(
ServiceLoader
serviceLoader
)
{
return
serviceLoader
;
}
@Override
public
Class
getObjectType
()
{
return
ServiceLoader
.
class
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java
浏览文件 @
c8e5aa07
...
...
@@ -231,6 +231,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
}
@Override
public
void
copyConfigurationFrom
(
ConfigurableBeanFactory
otherFactory
)
{
super
.
copyConfigurationFrom
(
otherFactory
);
if
(
otherFactory
instanceof
AbstractAutowireCapableBeanFactory
)
{
...
...
@@ -373,6 +374,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
* populates the bean instance, applies post-processors, etc.
* @see #doCreateBean
*/
@Override
protected
Object
createBean
(
final
String
beanName
,
final
RootBeanDefinition
mbd
,
final
Object
[]
args
)
throws
BeanCreationException
{
...
...
@@ -515,6 +517,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
return
exposedObject
;
}
@Override
protected
Class
predictBeanType
(
String
beanName
,
RootBeanDefinition
mbd
,
Class
[]
typesToMatch
)
{
Class
beanClass
=
null
;
if
(
mbd
.
getFactoryMethodName
()
!=
null
)
{
...
...
@@ -610,6 +613,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
* FactoryBean. If the FactoryBean instance itself is not kept as singleton,
* it will be fully created to check the type of its exposed object.
*/
@Override
protected
Class
getTypeForFactoryBean
(
String
beanName
,
RootBeanDefinition
mbd
)
{
FactoryBean
fb
=
(
mbd
.
isSingleton
()
?
getSingletonFactoryBeanForTypeCheck
(
beanName
,
mbd
)
:
...
...
@@ -1425,6 +1429,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
* object obtained from FactoryBeans (for example, to auto-proxy them).
* @see #applyBeanPostProcessorsAfterInitialization
*/
@Override
protected
Object
postProcessObjectFromFactoryBean
(
Object
object
,
String
beanName
)
{
return
applyBeanPostProcessorsAfterInitialization
(
object
,
beanName
);
}
...
...
@@ -1432,6 +1437,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
/**
* Overridden to clear FactoryBean instance cache as well.
*/
@Override
protected
void
removeSingleton
(
String
beanName
)
{
super
.
removeSingleton
(
beanName
);
this
.
factoryBeanInstanceCache
.
remove
(
beanName
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java
浏览文件 @
c8e5aa07
...
...
@@ -918,6 +918,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
* Delegates to {@link #cloneBeanDefinition()}.
* @see java.lang.Object#clone()
*/
@Override
public
Object
clone
()
{
return
cloneBeanDefinition
();
}
...
...
@@ -930,6 +931,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
public
abstract
AbstractBeanDefinition
cloneBeanDefinition
();
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -969,6 +971,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
return
super
.
equals
(
other
);
}
@Override
public
int
hashCode
()
{
int
hashCode
=
ObjectUtils
.
nullSafeHashCode
(
getBeanClassName
());
hashCode
=
29
*
hashCode
+
ObjectUtils
.
nullSafeHashCode
(
this
.
scope
);
...
...
@@ -980,6 +983,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
return
hashCode
;
}
@Override
public
String
toString
()
{
StringBuffer
sb
=
new
StringBuffer
(
"class ["
);
sb
.
append
(
getBeanClassName
()).
append
(
"]"
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java
浏览文件 @
c8e5aa07
...
...
@@ -502,6 +502,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
}
}
@Override
public
String
[]
getAliases
(
String
name
)
{
String
beanName
=
transformedBeanName
(
name
);
List
aliases
=
new
ArrayList
();
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionResource.java
浏览文件 @
c8e5aa07
...
...
@@ -54,10 +54,12 @@ class BeanDefinitionResource extends AbstractResource {
}
@Override
public
boolean
exists
()
{
return
false
;
}
@Override
public
boolean
isReadable
()
{
return
false
;
}
...
...
@@ -75,6 +77,7 @@ class BeanDefinitionResource extends AbstractResource {
/**
* This implementation compares the underlying BeanDefinition.
*/
@Override
public
boolean
equals
(
Object
obj
)
{
return
(
obj
==
this
||
(
obj
instanceof
BeanDefinitionResource
&&
...
...
@@ -84,6 +87,7 @@ class BeanDefinitionResource extends AbstractResource {
/**
* This implementation returns the hash code of the underlying BeanDefinition.
*/
@Override
public
int
hashCode
()
{
return
this
.
beanDefinition
.
hashCode
();
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java
浏览文件 @
c8e5aa07
...
...
@@ -63,6 +63,7 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
private
static
final
int
METHOD_REPLACER
=
2
;
@Override
protected
Object
instantiateWithMethodInjection
(
RootBeanDefinition
beanDefinition
,
String
beanName
,
BeanFactory
owner
)
{
...
...
@@ -70,6 +71,7 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
return
new
CglibSubclassCreator
(
beanDefinition
,
owner
).
instantiate
(
null
,
null
);
}
@Override
protected
Object
instantiateWithMethodInjection
(
RootBeanDefinition
beanDefinition
,
String
beanName
,
BeanFactory
owner
,
Constructor
ctor
,
Object
[]
args
)
{
...
...
@@ -133,11 +135,13 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
return
beanDefinition
;
}
@Override
public
boolean
equals
(
Object
other
)
{
return
(
other
.
getClass
().
equals
(
getClass
())
&&
((
CglibIdentitySupport
)
other
).
getBeanDefinition
().
equals
(
beanDefinition
));
}
@Override
public
int
hashCode
()
{
return
beanDefinition
.
hashCode
();
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/ChildBeanDefinition.java
浏览文件 @
c8e5aa07
...
...
@@ -139,6 +139,7 @@ public class ChildBeanDefinition extends AbstractBeanDefinition {
return
this
.
parentName
;
}
@Override
public
void
validate
()
throws
BeanDefinitionValidationException
{
super
.
validate
();
if
(
this
.
parentName
==
null
)
{
...
...
@@ -147,10 +148,12 @@ public class ChildBeanDefinition extends AbstractBeanDefinition {
}
@Override
public
AbstractBeanDefinition
cloneBeanDefinition
()
{
return
new
ChildBeanDefinition
(
this
);
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -162,10 +165,12 @@ public class ChildBeanDefinition extends AbstractBeanDefinition {
return
(
ObjectUtils
.
nullSafeEquals
(
this
.
parentName
,
that
.
parentName
)
&&
super
.
equals
(
other
));
}
@Override
public
int
hashCode
()
{
return
ObjectUtils
.
nullSafeHashCode
(
this
.
parentName
)
*
29
+
super
.
hashCode
();
}
@Override
public
String
toString
()
{
StringBuffer
sb
=
new
StringBuffer
(
"Child bean with parent '"
);
sb
.
append
(
this
.
parentName
).
append
(
"': "
).
append
(
super
.
toString
());
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
浏览文件 @
c8e5aa07
...
...
@@ -165,6 +165,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
}
@Override
public
void
copyConfigurationFrom
(
ConfigurableBeanFactory
otherFactory
)
{
super
.
copyConfigurationFrom
(
otherFactory
);
if
(
otherFactory
instanceof
DefaultListableBeanFactory
)
{
...
...
@@ -179,6 +180,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
// Implementation of ListableBeanFactory interface
//---------------------------------------------------------------------
@Override
public
boolean
containsBeanDefinition
(
String
beanName
)
{
return
this
.
beanDefinitionMap
.
containsKey
(
beanName
);
}
...
...
@@ -378,6 +380,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
new
BeanDefinitionHolder
(
mbd
,
beanName
,
getAliases
(
beanName
)),
descriptor
);
}
@Override
public
BeanDefinition
getBeanDefinition
(
String
beanName
)
throws
NoSuchBeanDefinitionException
{
BeanDefinition
bd
=
(
BeanDefinition
)
this
.
beanDefinitionMap
.
get
(
beanName
);
if
(
bd
==
null
)
{
...
...
@@ -405,6 +408,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
* if the factory's configuration has been marked as frozen.
* @see #freezeConfiguration()
*/
@Override
protected
boolean
isBeanEligibleForMetadataCaching
(
String
beanName
)
{
return
(
this
.
configurationFrozen
||
super
.
isBeanEligibleForMetadataCaching
(
beanName
));
}
...
...
@@ -529,6 +533,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
/**
* Only allows alias overriding if bean definition overriding is allowed.
*/
@Override
protected
boolean
allowAliasOverriding
()
{
return
this
.
allowBeanDefinitionOverriding
;
}
...
...
@@ -729,6 +734,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
}
@Override
public
String
toString
()
{
StringBuffer
sb
=
new
StringBuffer
(
ObjectUtils
.
identityToString
(
this
));
sb
.
append
(
": defining beans ["
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java
浏览文件 @
c8e5aa07
...
...
@@ -180,6 +180,7 @@ public abstract class FactoryBeanRegistrySupport extends DefaultSingletonBeanReg
/**
* Overridden to clear the FactoryBean object cache as well.
*/
@Override
protected
void
removeSingleton
(
String
beanName
)
{
super
.
removeSingleton
(
beanName
);
this
.
factoryBeanObjectCache
.
remove
(
beanName
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/GenericBeanDefinition.java
浏览文件 @
c8e5aa07
...
...
@@ -74,14 +74,17 @@ public class GenericBeanDefinition extends AbstractBeanDefinition {
}
@Override
public
AbstractBeanDefinition
cloneBeanDefinition
()
{
return
new
GenericBeanDefinition
(
this
);
}
@Override
public
boolean
equals
(
Object
other
)
{
return
(
this
==
other
||
(
other
instanceof
GenericBeanDefinition
&&
super
.
equals
(
other
)));
}
@Override
public
String
toString
()
{
return
"Generic bean: "
+
super
.
toString
();
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/LookupOverride.java
浏览文件 @
c8e5aa07
...
...
@@ -59,20 +59,24 @@ public class LookupOverride extends MethodOverride {
/**
* Match method of the given name, with no parameters.
*/
@Override
public
boolean
matches
(
Method
method
)
{
return
(
method
.
getName
().
equals
(
getMethodName
())
&&
method
.
getParameterTypes
().
length
==
0
);
}
@Override
public
String
toString
()
{
return
"LookupOverride for method '"
+
getMethodName
()
+
"'; will return bean '"
+
this
.
beanName
+
"'"
;
}
@Override
public
boolean
equals
(
Object
other
)
{
return
(
other
instanceof
LookupOverride
&&
super
.
equals
(
other
)
&&
ObjectUtils
.
nullSafeEquals
(
this
.
beanName
,
((
LookupOverride
)
other
).
beanName
));
}
@Override
public
int
hashCode
()
{
return
(
29
*
super
.
hashCode
()
+
ObjectUtils
.
nullSafeHashCode
(
this
.
beanName
));
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/MethodOverride.java
浏览文件 @
c8e5aa07
...
...
@@ -98,6 +98,7 @@ public abstract class MethodOverride implements BeanMetadataElement {
public
abstract
boolean
matches
(
Method
method
);
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -111,6 +112,7 @@ public abstract class MethodOverride implements BeanMetadataElement {
ObjectUtils
.
nullSafeEquals
(
this
.
source
,
that
.
source
));
}
@Override
public
int
hashCode
()
{
int
hashCode
=
ObjectUtils
.
nullSafeHashCode
(
this
.
methodName
);
hashCode
=
29
*
hashCode
+
ObjectUtils
.
nullSafeHashCode
(
this
.
source
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/MethodOverrides.java
浏览文件 @
c8e5aa07
...
...
@@ -99,6 +99,7 @@ public class MethodOverrides {
return
null
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
...
...
@@ -110,6 +111,7 @@ public class MethodOverrides {
return
true
;
}
@Override
public
int
hashCode
()
{
return
this
.
overrides
.
hashCode
();
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/ReplaceOverride.java
浏览文件 @
c8e5aa07
...
...
@@ -72,6 +72,7 @@ public class ReplaceOverride extends MethodOverride {
}
@Override
public
boolean
matches
(
Method
method
)
{
// TODO could cache result for efficiency
if
(!
method
.
getName
().
equals
(
getMethodName
()))
{
...
...
@@ -99,11 +100,13 @@ public class ReplaceOverride extends MethodOverride {
}
@Override
public
String
toString
()
{
return
"Replace override for method '"
+
getMethodName
()
+
"; will call bean '"
+
this
.
methodReplacerBeanName
+
"'"
;
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(!(
other
instanceof
ReplaceOverride
)
||
!
super
.
equals
(
other
))
{
return
false
;
...
...
@@ -113,6 +116,7 @@ public class ReplaceOverride extends MethodOverride {
ObjectUtils
.
nullSafeEquals
(
this
.
typeIdentifiers
,
that
.
typeIdentifiers
));
}
@Override
public
int
hashCode
()
{
int
hashCode
=
super
.
hashCode
();
hashCode
=
29
*
hashCode
+
ObjectUtils
.
nullSafeHashCode
(
this
.
methodReplacerBeanName
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/RootBeanDefinition.java
浏览文件 @
c8e5aa07
...
...
@@ -244,14 +244,17 @@ public class RootBeanDefinition extends AbstractBeanDefinition {
}
@Override
public
AbstractBeanDefinition
cloneBeanDefinition
()
{
return
new
RootBeanDefinition
(
this
);
}
@Override
public
boolean
equals
(
Object
other
)
{
return
(
this
==
other
||
(
other
instanceof
RootBeanDefinition
&&
super
.
equals
(
other
)));
}
@Override
public
String
toString
()
{
return
"Root bean: "
+
super
.
toString
();
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/xml/AbstractSimpleBeanDefinitionParser.java
浏览文件 @
c8e5aa07
...
...
@@ -123,6 +123,7 @@ public abstract class AbstractSimpleBeanDefinitionParser extends AbstractSingleB
* @param builder used to define the <code>BeanDefinition</code>
* @see #extractPropertyName(String)
*/
@Override
protected
final
void
doParse
(
Element
element
,
BeanDefinitionBuilder
builder
)
{
NamedNodeMap
attributes
=
element
.
getAttributes
();
for
(
int
x
=
0
;
x
<
attributes
.
getLength
();
x
++)
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/xml/AbstractSingleBeanDefinitionParser.java
浏览文件 @
c8e5aa07
...
...
@@ -56,6 +56,7 @@ public abstract class AbstractSingleBeanDefinitionParser extends AbstractBeanDef
* {@link #getBeanClass(org.w3c.dom.Element)} is <code>null</code>
* @see #doParse
*/
@Override
protected
final
AbstractBeanDefinition
parseInternal
(
Element
element
,
ParserContext
parserContext
)
{
BeanDefinitionBuilder
builder
=
BeanDefinitionBuilder
.
genericBeanDefinition
();
String
parentName
=
getParentName
(
element
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/xml/ResourceEntityResolver.java
浏览文件 @
c8e5aa07
...
...
@@ -69,6 +69,7 @@ public class ResourceEntityResolver extends DelegatingEntityResolver {
}
@Override
public
InputSource
resolveEntity
(
String
publicId
,
String
systemId
)
throws
SAXException
,
IOException
{
InputSource
source
=
super
.
resolveEntity
(
publicId
,
systemId
);
if
(
source
==
null
&&
systemId
!=
null
)
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/factory/xml/UtilNamespaceHandler.java
浏览文件 @
c8e5aa07
...
...
@@ -57,10 +57,12 @@ public class UtilNamespaceHandler extends NamespaceHandlerSupport {
private
static
class
ConstantBeanDefinitionParser
extends
AbstractSimpleBeanDefinitionParser
{
@Override
protected
Class
getBeanClass
(
Element
element
)
{
return
FieldRetrievingFactoryBean
.
class
;
}
@Override
protected
String
resolveId
(
Element
element
,
AbstractBeanDefinition
definition
,
ParserContext
parserContext
)
{
String
id
=
super
.
resolveId
(
element
,
definition
,
parserContext
);
if
(!
StringUtils
.
hasText
(
id
))
{
...
...
@@ -73,10 +75,12 @@ public class UtilNamespaceHandler extends NamespaceHandlerSupport {
private
static
class
PropertyPathBeanDefinitionParser
extends
AbstractSingleBeanDefinitionParser
{
@Override
protected
Class
getBeanClass
(
Element
element
)
{
return
PropertyPathFactoryBean
.
class
;
}
@Override
protected
void
doParse
(
Element
element
,
ParserContext
parserContext
,
BeanDefinitionBuilder
builder
)
{
String
path
=
element
.
getAttribute
(
"path"
);
if
(!
StringUtils
.
hasText
(
path
))
{
...
...
@@ -95,6 +99,7 @@ public class UtilNamespaceHandler extends NamespaceHandlerSupport {
builder
.
addPropertyValue
(
"propertyPath"
,
propertyPath
);
}
@Override
protected
String
resolveId
(
Element
element
,
AbstractBeanDefinition
definition
,
ParserContext
parserContext
)
{
String
id
=
super
.
resolveId
(
element
,
definition
,
parserContext
);
if
(!
StringUtils
.
hasText
(
id
))
{
...
...
@@ -107,10 +112,12 @@ public class UtilNamespaceHandler extends NamespaceHandlerSupport {
private
static
class
ListBeanDefinitionParser
extends
AbstractSingleBeanDefinitionParser
{
@Override
protected
Class
getBeanClass
(
Element
element
)
{
return
ListFactoryBean
.
class
;
}
@Override
protected
void
doParse
(
Element
element
,
ParserContext
parserContext
,
BeanDefinitionBuilder
builder
)
{
String
listClass
=
element
.
getAttribute
(
"list-class"
);
List
parsedList
=
parserContext
.
getDelegate
().
parseListElement
(
element
,
builder
.
getRawBeanDefinition
());
...
...
@@ -128,10 +135,12 @@ public class UtilNamespaceHandler extends NamespaceHandlerSupport {
private
static
class
SetBeanDefinitionParser
extends
AbstractSingleBeanDefinitionParser
{
@Override
protected
Class
getBeanClass
(
Element
element
)
{
return
SetFactoryBean
.
class
;
}
@Override
protected
void
doParse
(
Element
element
,
ParserContext
parserContext
,
BeanDefinitionBuilder
builder
)
{
String
setClass
=
element
.
getAttribute
(
"set-class"
);
Set
parsedSet
=
parserContext
.
getDelegate
().
parseSetElement
(
element
,
builder
.
getRawBeanDefinition
());
...
...
@@ -149,10 +158,12 @@ public class UtilNamespaceHandler extends NamespaceHandlerSupport {
private
static
class
MapBeanDefinitionParser
extends
AbstractSingleBeanDefinitionParser
{
@Override
protected
Class
getBeanClass
(
Element
element
)
{
return
MapFactoryBean
.
class
;
}
@Override
protected
void
doParse
(
Element
element
,
ParserContext
parserContext
,
BeanDefinitionBuilder
builder
)
{
String
mapClass
=
element
.
getAttribute
(
"map-class"
);
Map
parsedMap
=
parserContext
.
getDelegate
().
parseMapElement
(
element
,
builder
.
getRawBeanDefinition
());
...
...
@@ -170,14 +181,17 @@ public class UtilNamespaceHandler extends NamespaceHandlerSupport {
private
static
class
PropertiesBeanDefinitionParser
extends
AbstractSimpleBeanDefinitionParser
{
@Override
protected
Class
getBeanClass
(
Element
element
)
{
return
PropertiesFactoryBean
.
class
;
}
@Override
protected
boolean
isEligibleAttribute
(
String
attributeName
)
{
return
super
.
isEligibleAttribute
(
attributeName
)
&&
!
SCOPE_ATTRIBUTE
.
equals
(
attributeName
);
}
@Override
protected
void
doParse
(
Element
element
,
ParserContext
parserContext
,
BeanDefinitionBuilder
builder
)
{
super
.
doParse
(
element
,
parserContext
,
builder
);
Properties
parsedProps
=
parserContext
.
getDelegate
().
parsePropsElement
(
element
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/ByteArrayPropertyEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -28,10 +28,12 @@ import java.beans.PropertyEditorSupport;
*/
public
class
ByteArrayPropertyEditor
extends
PropertyEditorSupport
{
@Override
public
void
setAsText
(
String
text
)
{
setValue
(
text
!=
null
?
text
.
getBytes
()
:
null
);
}
@Override
public
String
getAsText
()
{
byte
[]
value
=
(
byte
[])
getValue
();
return
(
value
!=
null
?
new
String
(
value
)
:
""
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CharArrayPropertyEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -28,10 +28,12 @@ import java.beans.PropertyEditorSupport;
*/
public
class
CharArrayPropertyEditor
extends
PropertyEditorSupport
{
@Override
public
void
setAsText
(
String
text
)
{
setValue
(
text
!=
null
?
text
.
toCharArray
()
:
null
);
}
@Override
public
String
getAsText
()
{
char
[]
value
=
(
char
[])
getValue
();
return
(
value
!=
null
?
new
String
(
value
)
:
""
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CharacterEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -69,6 +69,7 @@ public class CharacterEditor extends PropertyEditorSupport {
}
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
if
(
this
.
allowEmpty
&&
!
StringUtils
.
hasLength
(
text
))
{
// Treat empty String as null value.
...
...
@@ -89,6 +90,7 @@ public class CharacterEditor extends PropertyEditorSupport {
}
}
@Override
public
String
getAsText
()
{
Object
value
=
getValue
();
return
(
value
!=
null
?
value
.
toString
()
:
""
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CharsetEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -33,6 +33,7 @@ import org.springframework.util.StringUtils;
*/
public
class
CharsetEditor
extends
PropertyEditorSupport
{
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
if
(
StringUtils
.
hasText
(
text
))
{
setValue
(
Charset
.
forName
(
text
));
...
...
@@ -42,6 +43,7 @@ public class CharsetEditor extends PropertyEditorSupport {
}
}
@Override
public
String
getAsText
()
{
Charset
value
=
(
Charset
)
getValue
();
return
(
value
!=
null
?
value
.
name
()
:
""
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/ClassArrayEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -57,6 +57,7 @@ public class ClassArrayEditor extends PropertyEditorSupport {
}
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
if
(
StringUtils
.
hasText
(
text
))
{
String
[]
classNames
=
StringUtils
.
commaDelimitedListToStringArray
(
text
);
...
...
@@ -72,6 +73,7 @@ public class ClassArrayEditor extends PropertyEditorSupport {
}
}
@Override
public
String
getAsText
()
{
Class
[]
classes
=
(
Class
[])
getValue
();
if
(
classes
==
null
||
classes
.
length
==
0
)
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/ClassEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -58,6 +58,7 @@ public class ClassEditor extends PropertyEditorSupport {
}
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
if
(
StringUtils
.
hasText
(
text
))
{
setValue
(
ClassUtils
.
resolveClassName
(
text
.
trim
(),
this
.
classLoader
));
...
...
@@ -67,6 +68,7 @@ public class ClassEditor extends PropertyEditorSupport {
}
}
@Override
public
String
getAsText
()
{
Class
clazz
=
(
Class
)
getValue
();
if
(
clazz
!=
null
)
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CustomBooleanEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -97,6 +97,7 @@ public class CustomBooleanEditor extends PropertyEditorSupport {
this
.
allowEmpty
=
allowEmpty
;
}
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
String
input
=
(
text
!=
null
?
text
.
trim
()
:
null
);
if
(
this
.
allowEmpty
&&
!
StringUtils
.
hasLength
(
input
))
{
...
...
@@ -124,6 +125,7 @@ public class CustomBooleanEditor extends PropertyEditorSupport {
}
}
@Override
public
String
getAsText
()
{
if
(
Boolean
.
TRUE
.
equals
(
getValue
()))
{
return
(
this
.
trueString
!=
null
?
this
.
trueString
:
VALUE_TRUE
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CustomCollectionEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -96,6 +96,7 @@ public class CustomCollectionEditor extends PropertyEditorSupport {
/**
* Convert the given text value to a Collection with a single element.
*/
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
setValue
(
text
);
}
...
...
@@ -103,6 +104,7 @@ public class CustomCollectionEditor extends PropertyEditorSupport {
/**
* Convert the given value to a Collection of the target type.
*/
@Override
public
void
setValue
(
Object
value
)
{
if
(
value
==
null
&&
this
.
nullAsEmptyCollection
)
{
super
.
setValue
(
createCollection
(
this
.
collectionType
,
0
));
...
...
@@ -199,6 +201,7 @@ public class CustomCollectionEditor extends PropertyEditorSupport {
* This implementation returns <code>null</code> to indicate that
* there is no appropriate text representation.
*/
@Override
public
String
getAsText
()
{
return
null
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CustomDateEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -92,6 +92,7 @@ public class CustomDateEditor extends PropertyEditorSupport {
/**
* Parse the Date from the given text, using the specified DateFormat.
*/
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
if
(
this
.
allowEmpty
&&
!
StringUtils
.
hasText
(
text
))
{
// Treat empty String as null value.
...
...
@@ -117,6 +118,7 @@ public class CustomDateEditor extends PropertyEditorSupport {
/**
* Format the Date as String, using the specified DateFormat.
*/
@Override
public
String
getAsText
()
{
Date
value
=
(
Date
)
getValue
();
return
(
value
!=
null
?
this
.
dateFormat
.
format
(
value
)
:
""
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CustomMapEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -86,6 +86,7 @@ public class CustomMapEditor extends PropertyEditorSupport {
/**
* Convert the given text value to a Map with a single element.
*/
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
setValue
(
text
);
}
...
...
@@ -93,6 +94,7 @@ public class CustomMapEditor extends PropertyEditorSupport {
/**
* Convert the given value to a Map of the target type.
*/
@Override
public
void
setValue
(
Object
value
)
{
if
(
value
==
null
&&
this
.
nullAsEmptyMap
)
{
super
.
setValue
(
createMap
(
this
.
mapType
,
0
));
...
...
@@ -192,6 +194,7 @@ public class CustomMapEditor extends PropertyEditorSupport {
* This implementation returns <code>null</code> to indicate that
* there is no appropriate text representation.
*/
@Override
public
String
getAsText
()
{
return
null
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/CustomNumberEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -100,6 +100,7 @@ public class CustomNumberEditor extends PropertyEditorSupport {
/**
* Parse the Number from the given text, using the specified NumberFormat.
*/
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
if
(
this
.
allowEmpty
&&
!
StringUtils
.
hasText
(
text
))
{
// Treat empty String as null value.
...
...
@@ -118,6 +119,7 @@ public class CustomNumberEditor extends PropertyEditorSupport {
/**
* Coerce a Number value into the required target class, if necessary.
*/
@Override
public
void
setValue
(
Object
value
)
{
if
(
value
instanceof
Number
)
{
super
.
setValue
(
NumberUtils
.
convertNumberToTargetClass
((
Number
)
value
,
this
.
numberClass
));
...
...
@@ -130,6 +132,7 @@ public class CustomNumberEditor extends PropertyEditorSupport {
/**
* Format the Number as String, using the specified NumberFormat.
*/
@Override
public
String
getAsText
()
{
Object
value
=
getValue
();
if
(
value
==
null
)
{
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/FileEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -77,6 +77,7 @@ public class FileEditor extends PropertyEditorSupport {
}
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
// Check whether we got an absolute file path without "file:" prefix.
// For backwards compatibility, we'll consider those as straight file path.
...
...
@@ -108,6 +109,7 @@ public class FileEditor extends PropertyEditorSupport {
}
}
@Override
public
String
getAsText
()
{
File
value
=
(
File
)
getValue
();
return
(
value
!=
null
?
value
.
getPath
()
:
""
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/InputStreamEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -66,6 +66,7 @@ public class InputStreamEditor extends PropertyEditorSupport {
}
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
this
.
resourceEditor
.
setAsText
(
text
);
Resource
resource
=
(
Resource
)
this
.
resourceEditor
.
getValue
();
...
...
@@ -82,6 +83,7 @@ public class InputStreamEditor extends PropertyEditorSupport {
* This implementation returns <code>null</code> to indicate that
* there is no appropriate text representation.
*/
@Override
public
String
getAsText
()
{
return
null
;
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/LocaleEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -34,10 +34,12 @@ import org.springframework.util.StringUtils;
*/
public
class
LocaleEditor
extends
PropertyEditorSupport
{
@Override
public
void
setAsText
(
String
text
)
{
setValue
(
StringUtils
.
parseLocaleString
(
text
));
}
@Override
public
String
getAsText
()
{
Object
value
=
getValue
();
return
(
value
!=
null
?
value
.
toString
()
:
""
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/PatternEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -55,10 +55,12 @@ public class PatternEditor extends PropertyEditorSupport {
}
@Override
public
void
setAsText
(
String
text
)
{
setValue
(
text
!=
null
?
Pattern
.
compile
(
text
,
this
.
flags
)
:
null
);
}
@Override
public
String
getAsText
()
{
Pattern
value
=
(
Pattern
)
getValue
();
return
(
value
!=
null
?
value
.
pattern
()
:
""
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/PropertiesEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -50,6 +50,7 @@ public class PropertiesEditor extends PropertyEditorSupport {
* properties content.
* @param text the text to be so converted
*/
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
Properties
props
=
new
Properties
();
if
(
text
!=
null
)
{
...
...
@@ -69,6 +70,7 @@ public class PropertiesEditor extends PropertyEditorSupport {
/**
* Take {@link Properties} as-is; convert {@link Map} into <code>Properties</code>.
*/
@Override
public
void
setValue
(
Object
value
)
{
if
(!(
value
instanceof
Properties
)
&&
value
instanceof
Map
)
{
Properties
props
=
new
Properties
();
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/ResourceBundleEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -79,6 +79,7 @@ public class ResourceBundleEditor extends PropertyEditorSupport {
public
static
final
String
BASE_NAME_SEPARATOR
=
"_"
;
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
Assert
.
hasText
(
text
,
"'text' must not be empty"
);
ResourceBundle
bundle
;
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/StringArrayPropertyEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -90,6 +90,7 @@ public class StringArrayPropertyEditor extends PropertyEditorSupport {
}
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
String
[]
array
=
StringUtils
.
delimitedListToStringArray
(
text
,
this
.
separator
,
this
.
charsToDelete
);
if
(
this
.
emptyArrayAsNull
&&
array
.
length
==
0
)
{
...
...
@@ -100,6 +101,7 @@ public class StringArrayPropertyEditor extends PropertyEditorSupport {
}
}
@Override
public
String
getAsText
()
{
return
StringUtils
.
arrayToDelimitedString
(
ObjectUtils
.
toObjectArray
(
getValue
()),
this
.
separator
);
}
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/StringTrimmerEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -61,6 +61,7 @@ public class StringTrimmerEditor extends PropertyEditorSupport {
}
@Override
public
void
setAsText
(
String
text
)
{
if
(
text
==
null
)
{
setValue
(
null
);
...
...
@@ -79,6 +80,7 @@ public class StringTrimmerEditor extends PropertyEditorSupport {
}
}
@Override
public
String
getAsText
()
{
Object
value
=
getValue
();
return
(
value
!=
null
?
value
.
toString
()
:
""
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/URIEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -67,6 +67,7 @@ public class URIEditor extends PropertyEditorSupport {
}
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
if
(
StringUtils
.
hasText
(
text
))
{
String
uri
=
text
.
trim
();
...
...
@@ -111,6 +112,7 @@ public class URIEditor extends PropertyEditorSupport {
}
@Override
public
String
getAsText
()
{
URI
value
=
(
URI
)
getValue
();
return
(
value
!=
null
?
value
.
toString
()
:
""
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/propertyeditors/URLEditor.java
浏览文件 @
c8e5aa07
...
...
@@ -66,6 +66,7 @@ public class URLEditor extends PropertyEditorSupport {
}
@Override
public
void
setAsText
(
String
text
)
throws
IllegalArgumentException
{
this
.
resourceEditor
.
setAsText
(
text
);
Resource
resource
=
(
Resource
)
this
.
resourceEditor
.
getValue
();
...
...
@@ -77,6 +78,7 @@ public class URLEditor extends PropertyEditorSupport {
}
}
@Override
public
String
getAsText
()
{
URL
value
=
(
URL
)
getValue
();
return
(
value
!=
null
?
value
.
toExternalForm
()
:
""
);
...
...
org.springframework.beans/src/main/java/org/springframework/beans/support/ArgumentConvertingMethodInvoker.java
浏览文件 @
c8e5aa07
...
...
@@ -106,6 +106,7 @@ public class ArgumentConvertingMethodInvoker extends MethodInvoker {
* This implementation looks for a method with matching parameter types.
* @see #doFindMatchingMethod
*/
@Override
protected
Method
findMatchingMethod
()
{
Method
matchingMethod
=
super
.
findMatchingMethod
();
// Second pass: look for method where arguments can be converted to parameter types.
...
...
org.springframework.beans/src/main/java/org/springframework/beans/support/MutableSortDefinition.java
浏览文件 @
c8e5aa07
...
...
@@ -149,6 +149,7 @@ public class MutableSortDefinition implements SortDefinition, Serializable {
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(
this
==
other
)
{
return
true
;
...
...
@@ -161,6 +162,7 @@ public class MutableSortDefinition implements SortDefinition, Serializable {
isAscending
()
==
otherSd
.
isAscending
()
&&
isIgnoreCase
()
==
otherSd
.
isIgnoreCase
());
}
@Override
public
int
hashCode
()
{
int
hashCode
=
getProperty
().
hashCode
();
hashCode
=
29
*
hashCode
+
(
isIgnoreCase
()
?
1
:
0
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录