Revert "Merge branch 'SPR-10130' into cleanup-master"

This reverts commit 45fa50821a, reversing
changes made to a312d900f8.
This commit is contained in:
Chris Beams
2013-01-02 10:33:59 +01:00
parent d5c6d797e5
commit 70eaf02b7f
1257 changed files with 2 additions and 5718 deletions

View File

@@ -36,38 +36,31 @@ public abstract class AbstractPropertyAccessor extends TypeConverterSupport impl
private boolean extractOldValueForEditor = false;
@Override
public void setExtractOldValueForEditor(boolean extractOldValueForEditor) {
this.extractOldValueForEditor = extractOldValueForEditor;
}
@Override
public boolean isExtractOldValueForEditor() {
return this.extractOldValueForEditor;
}
@Override
public void setPropertyValue(PropertyValue pv) throws BeansException {
setPropertyValue(pv.getName(), pv.getValue());
}
@Override
public void setPropertyValues(Map<?, ?> map) throws BeansException {
setPropertyValues(new MutablePropertyValues(map));
}
@Override
public void setPropertyValues(PropertyValues pvs) throws BeansException {
setPropertyValues(pvs, false, false);
}
@Override
public void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown) throws BeansException {
setPropertyValues(pvs, ignoreUnknown, false);
}
@Override
public void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown, boolean ignoreInvalid)
throws BeansException {
@@ -125,7 +118,6 @@ public abstract class AbstractPropertyAccessor extends TypeConverterSupport impl
* @throws PropertyAccessException if the property was valid but the
* accessor method failed
*/
@Override
public abstract Object getPropertyValue(String propertyName) throws BeansException;
/**
@@ -137,7 +129,6 @@ public abstract class AbstractPropertyAccessor extends TypeConverterSupport impl
* @throws PropertyAccessException if the property was valid but the
* accessor method failed or a type mismatch occured
*/
@Override
public abstract void setPropertyValue(String propertyName, Object value) throws BeansException;
}

View File

@@ -69,7 +69,6 @@ public class BeanMetadataAttribute implements BeanMetadataElement {
this.source = source;
}
@Override
public Object getSource() {
return this.source;
}

View File

@@ -40,7 +40,6 @@ public class BeanMetadataAttributeAccessor extends AttributeAccessorSupport impl
this.source = source;
}
@Override
public Object getSource() {
return this.source;
}

View File

@@ -219,12 +219,10 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
setIntrospectionClass(object.getClass());
}
@Override
public final Object getWrappedInstance() {
return this.object;
}
@Override
public final Class getWrappedClass() {
return (this.object != null ? this.object.getClass() : null);
}
@@ -259,7 +257,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
* enables auto-growth of collection elements when accessing an out-of-bounds index.
* <p>Default is "false" on a plain BeanWrapper.
*/
@Override
public void setAutoGrowNestedPaths(boolean autoGrowNestedPaths) {
this.autoGrowNestedPaths = autoGrowNestedPaths;
}
@@ -267,7 +264,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
/**
* Return whether "auto-growing" of nested paths has been activated.
*/
@Override
public boolean isAutoGrowNestedPaths() {
return this.autoGrowNestedPaths;
}
@@ -276,7 +272,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
* Specify a limit for array and collection auto-growing.
* <p>Default is unlimited on a plain BeanWrapper.
*/
@Override
public void setAutoGrowCollectionLimit(int autoGrowCollectionLimit) {
this.autoGrowCollectionLimit = autoGrowCollectionLimit;
}
@@ -284,7 +279,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
/**
* Return the limit for array and collection auto-growing.
*/
@Override
public int getAutoGrowCollectionLimit() {
return this.autoGrowCollectionLimit;
}
@@ -330,12 +324,10 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
}
@Override
public PropertyDescriptor[] getPropertyDescriptors() {
return getCachedIntrospectionResults().getPropertyDescriptors();
}
@Override
public PropertyDescriptor getPropertyDescriptor(String propertyName) throws BeansException {
PropertyDescriptor pd = getPropertyDescriptorInternal(propertyName);
if (pd == null) {
@@ -386,7 +378,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
return null;
}
@Override
public TypeDescriptor getPropertyTypeDescriptor(String propertyName) throws BeansException {
try {
BeanWrapperImpl nestedBw = getBeanWrapperForPropertyPath(propertyName);
@@ -411,7 +402,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
return null;
}
@Override
public boolean isReadableProperty(String propertyName) {
try {
PropertyDescriptor pd = getPropertyDescriptorInternal(propertyName);
@@ -432,7 +422,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
return false;
}
@Override
public boolean isWritableProperty(String propertyName) {
try {
PropertyDescriptor pd = getPropertyDescriptorInternal(propertyName);
@@ -722,7 +711,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
if (!Modifier.isPublic(readMethod.getDeclaringClass().getModifiers()) && !readMethod.isAccessible()) {
if (System.getSecurityManager() != null) {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
readMethod.setAccessible(true);
return null;
@@ -738,7 +726,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
if (System.getSecurityManager() != null) {
try {
value = AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
@Override
public Object run() throws Exception {
return readMethod.invoke(object, (Object[]) null);
}
@@ -1075,7 +1062,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
!readMethod.isAccessible()) {
if (System.getSecurityManager()!= null) {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
readMethod.setAccessible(true);
return null;
@@ -1089,7 +1075,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
try {
if (System.getSecurityManager() != null) {
oldValue = AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
@Override
public Object run() throws Exception {
return readMethod.invoke(object);
}
@@ -1119,7 +1104,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
if (!Modifier.isPublic(writeMethod.getDeclaringClass().getModifiers()) && !writeMethod.isAccessible()) {
if (System.getSecurityManager()!= null) {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
writeMethod.setAccessible(true);
return null;
@@ -1134,7 +1118,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
if (System.getSecurityManager() != null) {
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
@Override
public Object run() throws Exception {
writeMethod.invoke(object, value);
return null;

View File

@@ -59,7 +59,6 @@ public class DirectFieldAccessor extends AbstractPropertyAccessor {
Assert.notNull(target, "Target object must not be null");
this.target = target;
ReflectionUtils.doWithFields(this.target.getClass(), new ReflectionUtils.FieldCallback() {
@Override
public void doWith(Field field) {
if (fieldMap.containsKey(field.getName())) {
// ignore superclass declarations of fields already found in a subclass
@@ -75,12 +74,10 @@ public class DirectFieldAccessor extends AbstractPropertyAccessor {
}
@Override
public boolean isReadableProperty(String propertyName) throws BeansException {
return this.fieldMap.containsKey(propertyName);
}
@Override
public boolean isWritableProperty(String propertyName) throws BeansException {
return this.fieldMap.containsKey(propertyName);
}
@@ -94,7 +91,6 @@ public class DirectFieldAccessor extends AbstractPropertyAccessor {
return null;
}
@Override
public TypeDescriptor getPropertyTypeDescriptor(String propertyName) throws BeansException {
Field field = this.fieldMap.get(propertyName);
if (field != null) {

View File

@@ -217,43 +217,35 @@ class ExtendedBeanInfo implements BeanInfo {
* method found during construction.
* @see #ExtendedBeanInfo(BeanInfo)
*/
@Override
public PropertyDescriptor[] getPropertyDescriptors() {
return this.propertyDescriptors.toArray(
new PropertyDescriptor[this.propertyDescriptors.size()]);
}
@Override
public BeanInfo[] getAdditionalBeanInfo() {
return delegate.getAdditionalBeanInfo();
}
@Override
public BeanDescriptor getBeanDescriptor() {
return delegate.getBeanDescriptor();
}
@Override
public int getDefaultEventIndex() {
return delegate.getDefaultEventIndex();
}
@Override
public int getDefaultPropertyIndex() {
return delegate.getDefaultPropertyIndex();
}
@Override
public EventSetDescriptor[] getEventSetDescriptors() {
return delegate.getEventSetDescriptors();
}
@Override
public Image getIcon(int iconKind) {
return delegate.getIcon(iconKind);
}
@Override
public MethodDescriptor[] getMethodDescriptors() {
return delegate.getMethodDescriptors();
}
@@ -663,7 +655,6 @@ class PropertyDescriptorUtils {
*/
class PropertyDescriptorComparator implements Comparator<PropertyDescriptor> {
@Override
public int compare(PropertyDescriptor desc1, PropertyDescriptor desc2) {
String left = desc1.getName();
String right = desc2.getName();

View File

@@ -40,7 +40,6 @@ public class ExtendedBeanInfoFactory implements Ordered, BeanInfoFactory {
/**
* Return a new {@link ExtendedBeanInfo} for the given bean class.
*/
@Override
public BeanInfo getBeanInfo(Class<?> beanClass) throws IntrospectionException {
return supports(beanClass) ?
new ExtendedBeanInfo(Introspector.getBeanInfo(beanClass)) : null;
@@ -59,7 +58,6 @@ public class ExtendedBeanInfoFactory implements Ordered, BeanInfoFactory {
return false;
}
@Override
public int getOrder() {
return Ordered.LOWEST_PRECEDENCE;
}

View File

@@ -42,7 +42,6 @@ public class MethodInvocationException extends PropertyAccessException {
super(propertyChangeEvent, "Property '" + propertyChangeEvent.getPropertyName() + "' threw exception", cause);
}
@Override
public String getErrorCode() {
return ERROR_CODE;
}

View File

@@ -244,12 +244,10 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
}
@Override
public PropertyValue[] getPropertyValues() {
return this.propertyValueList.toArray(new PropertyValue[this.propertyValueList.size()]);
}
@Override
public PropertyValue getPropertyValue(String propertyName) {
for (PropertyValue pv : this.propertyValueList) {
if (pv.getName().equals(propertyName)) {
@@ -259,7 +257,6 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
return null;
}
@Override
public PropertyValues changesSince(PropertyValues old) {
MutablePropertyValues changes = new MutablePropertyValues();
if (old == this) {
@@ -281,13 +278,11 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
return changes;
}
@Override
public boolean contains(String propertyName) {
return (getPropertyValue(propertyName) != null ||
(this.processedProperties != null && this.processedProperties.contains(propertyName)));
}
@Override
public boolean isEmpty() {
return this.propertyValueList.isEmpty();
}

View File

@@ -269,12 +269,10 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
// Management of custom editors
//---------------------------------------------------------------------
@Override
public void registerCustomEditor(Class<?> requiredType, PropertyEditor propertyEditor) {
registerCustomEditor(requiredType, null, propertyEditor);
}
@Override
public void registerCustomEditor(Class<?> requiredType, String propertyPath, PropertyEditor propertyEditor) {
if (requiredType == null && propertyPath == null) {
throw new IllegalArgumentException("Either requiredType or propertyPath is required");
@@ -321,7 +319,6 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
return (this.sharedEditors != null && this.sharedEditors.contains(propertyEditor));
}
@Override
public PropertyEditor findCustomEditor(Class<?> requiredType, String propertyPath) {
Class<?> requiredTypeToUse = requiredType;
if (propertyPath != null) {

View File

@@ -35,19 +35,16 @@ public abstract class TypeConverterSupport extends PropertyEditorRegistrySupport
TypeConverterDelegate typeConverterDelegate;
@Override
public <T> T convertIfNecessary(Object value, Class<T> requiredType) throws TypeMismatchException {
return doConvert(value, requiredType, null, null);
}
@Override
public <T> T convertIfNecessary(Object value, Class<T> requiredType, MethodParameter methodParam)
throws TypeMismatchException {
return doConvert(value, requiredType, methodParam, null);
}
@Override
public <T> T convertIfNecessary(Object value, Class<T> requiredType, Field field)
throws TypeMismatchException {

View File

@@ -107,7 +107,6 @@ public class TypeMismatchException extends PropertyAccessException {
return this.requiredType;
}
@Override
public String getErrorCode() {
return ERROR_CODE;
}

View File

@@ -349,7 +349,6 @@ public class SingletonBeanFactoryLocator implements BeanFactoryLocator {
this.resourceLocation = resourceLocation;
}
@Override
public BeanFactoryReference useBeanFactory(String factoryKey) throws BeansException {
synchronized (this.bfgInstancesByKey) {
BeanFactoryGroup bfg = this.bfgInstancesByKey.get(this.resourceLocation);
@@ -501,13 +500,11 @@ public class SingletonBeanFactoryLocator implements BeanFactoryLocator {
this.groupContextRef = groupContext;
}
@Override
public BeanFactory getFactory() {
return this.beanFactory;
}
// Note that it's legal to call release more than once!
@Override
public void release() throws FatalBeanException {
synchronized (bfgInstancesByKey) {
BeanFactory savedRef = this.groupContextRef;

View File

@@ -71,7 +71,6 @@ public class AnnotatedGenericBeanDefinition extends GenericBeanDefinition implem
}
@Override
public final AnnotationMetadata getMetadata() {
return this.metadata;
}

View File

@@ -36,7 +36,6 @@ import org.springframework.util.ClassUtils;
*/
public class AnnotationBeanWiringInfoResolver implements BeanWiringInfoResolver {
@Override
public BeanWiringInfo resolveWiringInfo(Object beanInstance) {
Assert.notNull(beanInstance, "Bean instance must not be null");
Configurable annotation = beanInstance.getClass().getAnnotation(Configurable.class);

View File

@@ -199,12 +199,10 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
this.order = order;
}
@Override
public int getOrder() {
return this.order;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
if (!(beanFactory instanceof ConfigurableListableBeanFactory)) {
throw new IllegalArgumentException(
@@ -214,7 +212,6 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
}
@Override
public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class<?> beanType, String beanName) {
if (beanType != null) {
InjectionMetadata metadata = findAutowiringMetadata(beanType);

View File

@@ -59,12 +59,10 @@ public class CustomAutowireConfigurer implements BeanFactoryPostProcessor, BeanC
this.order = order;
}
@Override
public int getOrder() {
return this.order;
}
@Override
public void setBeanClassLoader(ClassLoader beanClassLoader) {
this.beanClassLoader = beanClassLoader;
}
@@ -84,7 +82,6 @@ public class CustomAutowireConfigurer implements BeanFactoryPostProcessor, BeanC
}
@Override
@SuppressWarnings("unchecked")
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
if (this.customQualifierTypes != null) {

View File

@@ -112,13 +112,11 @@ public class InitDestroyAnnotationBeanPostProcessor
this.order = order;
}
@Override
public int getOrder() {
return this.order;
}
@Override
public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class<?> beanType, String beanName) {
if (beanType != null) {
LifecycleMetadata metadata = findLifecycleMetadata(beanType);
@@ -126,7 +124,6 @@ public class InitDestroyAnnotationBeanPostProcessor
}
}
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
LifecycleMetadata metadata = findLifecycleMetadata(bean.getClass());
try {
@@ -141,12 +138,10 @@ public class InitDestroyAnnotationBeanPostProcessor
return bean;
}
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
return bean;
}
@Override
public void postProcessBeforeDestruction(Object bean, String beanName) throws BeansException {
LifecycleMetadata metadata = findLifecycleMetadata(bean.getClass());
try {

View File

@@ -126,7 +126,6 @@ public class QualifierAnnotationAutowireCandidateResolver implements AutowireCan
this.valueAnnotationType = valueAnnotationType;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
}
@@ -144,7 +143,6 @@ public class QualifierAnnotationAutowireCandidateResolver implements AutowireCan
* attribute does not match.
* @see Qualifier
*/
@Override
public boolean isAutowireCandidate(BeanDefinitionHolder bdHolder, DependencyDescriptor descriptor) {
if (!bdHolder.getBeanDefinition().isAutowireCandidate()) {
// if explicitly false, do not proceed with qualifier check
@@ -295,7 +293,6 @@ public class QualifierAnnotationAutowireCandidateResolver implements AutowireCan
* Determine whether the given dependency carries a value annotation.
* @see Value
*/
@Override
public Object getSuggestedValue(DependencyDescriptor descriptor) {
Object value = findValue(descriptor.getAnnotations());
if (value == null) {

View File

@@ -116,7 +116,6 @@ public class RequiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP
return this.requiredAnnotationType;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
if (beanFactory instanceof ConfigurableListableBeanFactory) {
this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
@@ -127,13 +126,11 @@ public class RequiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP
this.order = order;
}
@Override
public int getOrder() {
return this.order;
}
@Override
public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class<?> beanType, String beanName) {
}

View File

@@ -84,17 +84,14 @@ public abstract class AbstractFactoryBean<T>
this.singleton = singleton;
}
@Override
public boolean isSingleton() {
return this.singleton;
}
@Override
public void setBeanClassLoader(ClassLoader classLoader) {
this.beanClassLoader = classLoader;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
}
@@ -127,7 +124,6 @@ public abstract class AbstractFactoryBean<T>
/**
* Eagerly create the singleton instance, if necessary.
*/
@Override
public void afterPropertiesSet() throws Exception {
if (isSingleton()) {
this.initialized = true;
@@ -142,7 +138,6 @@ public abstract class AbstractFactoryBean<T>
* @see #createInstance()
* @see #getEarlySingletonInterfaces()
*/
@Override
public final T getObject() throws Exception {
if (isSingleton()) {
return (this.initialized ? this.singletonInstance : getEarlySingletonInstance());
@@ -186,7 +181,6 @@ public abstract class AbstractFactoryBean<T>
* Destroy the singleton instance, if any.
* @see #destroyInstance(Object)
*/
@Override
public void destroy() throws Exception {
if (isSingleton()) {
destroyInstance(this.singletonInstance);
@@ -199,7 +193,6 @@ public abstract class AbstractFactoryBean<T>
* interface, for a consistent offering of abstract template methods.
* @see org.springframework.beans.factory.FactoryBean#getObjectType()
*/
@Override
public abstract Class<?> getObjectType();
/**
@@ -248,7 +241,6 @@ public abstract class AbstractFactoryBean<T>
*/
private class EarlySingletonInvocationHandler implements InvocationHandler {
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if (ReflectionUtils.isEqualsMethod(method)) {
// Only consider equal when proxies are identical.

View File

@@ -108,7 +108,6 @@ public class BeanDefinitionHolder implements BeanMetadataElement {
* Expose the bean definition's source object.
* @see BeanDefinition#getSource()
*/
@Override
public Object getSource() {
return this.beanDefinition.getSource();
}

View File

@@ -65,7 +65,6 @@ public class BeanReferenceFactoryBean implements SmartFactoryBean, BeanFactoryAw
this.targetBeanName = targetBeanName;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
if (this.targetBeanName == null) {
@@ -77,7 +76,6 @@ public class BeanReferenceFactoryBean implements SmartFactoryBean, BeanFactoryAw
}
@Override
public Object getObject() throws BeansException {
if (this.beanFactory == null) {
throw new FactoryBeanNotInitializedException();
@@ -85,7 +83,6 @@ public class BeanReferenceFactoryBean implements SmartFactoryBean, BeanFactoryAw
return this.beanFactory.getBean(this.targetBeanName);
}
@Override
public Class getObjectType() {
if (this.beanFactory == null) {
return null;
@@ -93,7 +90,6 @@ public class BeanReferenceFactoryBean implements SmartFactoryBean, BeanFactoryAw
return this.beanFactory.getType(this.targetBeanName);
}
@Override
public boolean isSingleton() {
if (this.beanFactory == null) {
throw new FactoryBeanNotInitializedException();
@@ -101,7 +97,6 @@ public class BeanReferenceFactoryBean implements SmartFactoryBean, BeanFactoryAw
return this.beanFactory.isSingleton(this.targetBeanName);
}
@Override
public boolean isPrototype() {
if (this.beanFactory == null) {
throw new FactoryBeanNotInitializedException();
@@ -109,7 +104,6 @@ public class BeanReferenceFactoryBean implements SmartFactoryBean, BeanFactoryAw
return this.beanFactory.isPrototype(this.targetBeanName);
}
@Override
public boolean isEagerInit() {
return false;
}

View File

@@ -53,24 +53,20 @@ public class CommonsLogFactoryBean implements FactoryBean<Log>, InitializingBean
}
@Override
public void afterPropertiesSet() {
if (this.log == null) {
throw new IllegalArgumentException("'logName' is required");
}
}
@Override
public Log getObject() {
return this.log;
}
@Override
public Class<? extends Log> getObjectType() {
return (this.log != null ? this.log.getClass() : Log.class);
}
@Override
public boolean isSingleton() {
return true;
}

View File

@@ -519,7 +519,6 @@ public class ConstructorArgumentValues {
this.source = source;
}
@Override
public Object getSource() {
return this.source;
}

View File

@@ -119,7 +119,6 @@ public class CustomEditorConfigurer implements BeanFactoryPostProcessor, BeanCla
this.order = order;
}
@Override
public int getOrder() {
return this.order;
}
@@ -162,13 +161,11 @@ public class CustomEditorConfigurer implements BeanFactoryPostProcessor, BeanCla
this.ignoreUnresolvableEditors = ignoreUnresolvableEditors;
}
@Override
public void setBeanClassLoader(ClassLoader beanClassLoader) {
this.beanClassLoader = beanClassLoader;
}
@Override
@SuppressWarnings("unchecked")
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
if (this.propertyEditorRegistrars != null) {
@@ -237,7 +234,6 @@ public class CustomEditorConfigurer implements BeanFactoryPostProcessor, BeanCla
this.sharedEditor = sharedEditor;
}
@Override
public void registerCustomEditors(PropertyEditorRegistry registry) {
if (!(registry instanceof PropertyEditorRegistrySupport)) {
throw new IllegalArgumentException("Cannot registered shared editor " +

View File

@@ -65,18 +65,15 @@ public class CustomScopeConfigurer implements BeanFactoryPostProcessor, BeanClas
this.order = order;
}
@Override
public int getOrder() {
return this.order;
}
@Override
public void setBeanClassLoader(ClassLoader beanClassLoader) {
this.beanClassLoader = beanClassLoader;
}
@Override
@SuppressWarnings("unchecked")
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
if (this.scopes != null) {

View File

@@ -52,7 +52,6 @@ public class DeprecatedBeanWarner implements BeanFactoryPostProcessor {
}
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
if (isLogEnabled()) {
String[] beanNames = beanFactory.getBeanDefinitionNames();

View File

@@ -142,18 +142,15 @@ public class FieldRetrievingFactoryBean
* nor "targetField" have been specified.
* This allows for concise bean definitions with just an id/name.
*/
@Override
public void setBeanName(String beanName) {
this.beanName = StringUtils.trimAllWhitespace(BeanFactoryUtils.originalBeanName(beanName));
}
@Override
public void setBeanClassLoader(ClassLoader classLoader) {
this.beanClassLoader = classLoader;
}
@Override
public void afterPropertiesSet() throws ClassNotFoundException, NoSuchFieldException {
if (this.targetClass != null && this.targetObject != null) {
throw new IllegalArgumentException("Specify either targetClass or targetObject, not both");
@@ -194,7 +191,6 @@ public class FieldRetrievingFactoryBean
}
@Override
public Object getObject() throws IllegalAccessException {
if (this.fieldObject == null) {
throw new FactoryBeanNotInitializedException();
@@ -210,12 +206,10 @@ public class FieldRetrievingFactoryBean
}
}
@Override
public Class<?> getObjectType() {
return (this.fieldObject != null ? this.fieldObject.getType() : null);
}
@Override
public boolean isSingleton() {
return false;
}

View File

@@ -39,32 +39,26 @@ import org.springframework.beans.PropertyValues;
*/
public abstract class InstantiationAwareBeanPostProcessorAdapter implements SmartInstantiationAwareBeanPostProcessor {
@Override
public Class<?> predictBeanType(Class<?> beanClass, String beanName) {
return null;
}
@Override
public Constructor<?>[] determineCandidateConstructors(Class<?> beanClass, String beanName) throws BeansException {
return null;
}
@Override
public Object getEarlyBeanReference(Object bean, String beanName) throws BeansException {
return bean;
}
@Override
public Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws BeansException {
return null;
}
@Override
public boolean postProcessAfterInstantiation(Object bean, String beanName) throws BeansException {
return true;
}
@Override
public PropertyValues postProcessPropertyValues(
PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName)
throws BeansException {
@@ -72,12 +66,10 @@ public abstract class InstantiationAwareBeanPostProcessorAdapter implements Smar
return pvs;
}
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
return bean;
}
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
return bean;
}

View File

@@ -110,12 +110,10 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker
this.singleton = singleton;
}
@Override
public boolean isSingleton() {
return this.singleton;
}
@Override
public void setBeanClassLoader(ClassLoader classLoader) {
this.beanClassLoader = classLoader;
}
@@ -125,7 +123,6 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker
return ClassUtils.forName(className, this.beanClassLoader);
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
if (beanFactory instanceof ConfigurableBeanFactory) {
this.beanFactory = (ConfigurableBeanFactory) beanFactory;
@@ -148,7 +145,6 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker
}
@Override
public void afterPropertiesSet() throws Exception {
prepare();
if (this.singleton) {
@@ -182,7 +178,6 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker
* to "true", otherwise returns the value returned from invoking the
* specified method on the fly.
*/
@Override
public Object getObject() throws Exception {
if (this.singleton) {
if (!this.initialized) {
@@ -201,7 +196,6 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker
* Return the type of object that this FactoryBean creates,
* or {@code null} if not known in advance.
*/
@Override
public Class<?> getObjectType() {
if (!isPrepared()) {
// Not fully initialized yet -> return null to indicate "not known yet".

View File

@@ -143,7 +143,6 @@ public class ObjectFactoryCreatingFactoryBean extends AbstractFactoryBean<Object
this.targetBeanName = targetBeanName;
}
@Override
public Object getObject() throws BeansException {
return this.beanFactory.getBean(this.targetBeanName);
}

View File

@@ -174,7 +174,6 @@ public abstract class PlaceholderConfigurerSupport extends PropertyResourceConfi
* @see #setLocations
* @see org.springframework.core.io.ResourceEditor
*/
@Override
public void setBeanName(String beanName) {
this.beanName = beanName;
}
@@ -187,7 +186,6 @@ public abstract class PlaceholderConfigurerSupport extends PropertyResourceConfi
* @see #setLocations
* @see org.springframework.core.io.ResourceEditor
*/
@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
}

View File

@@ -74,7 +74,6 @@ public class PreferencesPlaceholderConfigurer extends PropertyPlaceholderConfigu
* This implementation eagerly fetches the Preferences instances
* for the required system and user tree nodes.
*/
@Override
public void afterPropertiesSet() {
this.systemPrefs = (this.systemTreePath != null) ?
Preferences.systemRoot().node(this.systemTreePath) : Preferences.systemRoot();

View File

@@ -59,20 +59,17 @@ public class PropertiesFactoryBean extends PropertiesLoaderSupport
this.singleton = singleton;
}
@Override
public final boolean isSingleton() {
return this.singleton;
}
@Override
public final void afterPropertiesSet() throws IOException {
if (this.singleton) {
this.singletonInstance = createProperties();
}
}
@Override
public final Properties getObject() throws IOException {
if (this.singleton) {
return this.singletonInstance;
@@ -82,7 +79,6 @@ public class PropertiesFactoryBean extends PropertiesLoaderSupport
}
}
@Override
public Class<Properties> getObjectType() {
return Properties.class;
}

View File

@@ -147,13 +147,11 @@ public class PropertyPathFactoryBean implements FactoryBean<Object>, BeanNameAwa
* "targetBeanName" nor "propertyPath" have been specified.
* This allows for concise bean definitions with just an id/name.
*/
@Override
public void setBeanName(String beanName) {
this.beanName = StringUtils.trimAllWhitespace(BeanFactoryUtils.originalBeanName(beanName));
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
@@ -192,7 +190,6 @@ public class PropertyPathFactoryBean implements FactoryBean<Object>, BeanNameAwa
}
@Override
public Object getObject() throws BeansException {
BeanWrapper target = this.targetBeanWrapper;
if (target != null) {
@@ -211,7 +208,6 @@ public class PropertyPathFactoryBean implements FactoryBean<Object>, BeanNameAwa
return target.getPropertyValue(this.propertyPath);
}
@Override
public Class<?> getObjectType() {
return this.resultType;
}
@@ -222,7 +218,6 @@ public class PropertyPathFactoryBean implements FactoryBean<Object>, BeanNameAwa
* for each call, so we have to assume that we're not returning the
* same object for each {@link #getObject()} call.
*/
@Override
public boolean isSingleton() {
return false;
}

View File

@@ -251,7 +251,6 @@ public class PropertyPlaceholderConfigurer extends PlaceholderConfigurerSupport
this.resolver = new PropertyPlaceholderConfigurerResolver(props);
}
@Override
public String resolveStringValue(String strVal) throws BeansException {
String value = this.helper.replacePlaceholders(strVal, this.resolver);
return (value.equals(nullValue) ? null : value);
@@ -267,7 +266,6 @@ public class PropertyPlaceholderConfigurer extends PlaceholderConfigurerSupport
this.props = props;
}
@Override
public String resolvePlaceholder(String placeholderName) {
return PropertyPlaceholderConfigurer.this.resolvePlaceholder(placeholderName, props, systemPropertiesMode);
}

View File

@@ -63,7 +63,6 @@ public abstract class PropertyResourceConfigurer extends PropertiesLoaderSupport
this.order = order;
}
@Override
public int getOrder() {
return this.order;
}
@@ -74,7 +73,6 @@ public abstract class PropertyResourceConfigurer extends PropertiesLoaderSupport
* {@linkplain #processProperties process} properties against the given bean factory.
* @throws BeanInitializationException if any properties cannot be loaded
*/
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
try {
Properties mergedProps = mergeProperties();

View File

@@ -88,7 +88,6 @@ public class ProviderCreatingFactoryBean extends AbstractFactoryBean<Provider> {
this.targetBeanName = targetBeanName;
}
@Override
public Object get() throws BeansException {
return this.beanFactory.getBean(this.targetBeanName);
}

View File

@@ -44,7 +44,6 @@ public class RuntimeBeanNameReference implements BeanReference {
this.beanName = beanName;
}
@Override
public String getBeanName() {
return this.beanName;
}
@@ -57,7 +56,6 @@ public class RuntimeBeanNameReference implements BeanReference {
this.source = source;
}
@Override
public Object getSource() {
return this.source;
}

View File

@@ -61,7 +61,6 @@ public class RuntimeBeanReference implements BeanReference {
}
@Override
public String getBeanName() {
return this.beanName;
}
@@ -82,7 +81,6 @@ public class RuntimeBeanReference implements BeanReference {
this.source = source;
}
@Override
public Object getSource() {
return this.source;
}

View File

@@ -246,7 +246,6 @@ public class ServiceLocatorFactoryBean implements FactoryBean<Object>, BeanFacto
this.serviceMappings = serviceMappings;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
if (!(beanFactory instanceof ListableBeanFactory)) {
throw new FatalBeanException(
@@ -255,7 +254,6 @@ public class ServiceLocatorFactoryBean implements FactoryBean<Object>, BeanFacto
this.beanFactory = (ListableBeanFactory) beanFactory;
}
@Override
public void afterPropertiesSet() {
if (this.serviceLocatorInterface == null) {
throw new IllegalArgumentException("Property 'serviceLocatorInterface' is required");
@@ -325,17 +323,14 @@ public class ServiceLocatorFactoryBean implements FactoryBean<Object>, BeanFacto
}
@Override
public Object getObject() {
return this.proxy;
}
@Override
public Class<?> getObjectType() {
return this.serviceLocatorInterface;
}
@Override
public boolean isSingleton() {
return true;
}
@@ -346,7 +341,6 @@ public class ServiceLocatorFactoryBean implements FactoryBean<Object>, BeanFacto
*/
private class ServiceLocatorInvocationHandler implements InvocationHandler {
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if (ReflectionUtils.isEqualsMethod(method)) {
// Only consider equal when proxies are identical.

View File

@@ -171,7 +171,6 @@ public class TypedStringValue implements BeanMetadataElement {
this.source = source;
}
@Override
public Object getSource() {
return this.source;
}

View File

@@ -35,7 +35,6 @@ public abstract class AbstractComponentDefinition implements ComponentDefinition
/**
* Delegates to {@link #getName}.
*/
@Override
public String getDescription() {
return getName();
}
@@ -43,7 +42,6 @@ public abstract class AbstractComponentDefinition implements ComponentDefinition
/**
* Returns an empty array.
*/
@Override
public BeanDefinition[] getBeanDefinitions() {
return new BeanDefinition[0];
}
@@ -51,7 +49,6 @@ public abstract class AbstractComponentDefinition implements ComponentDefinition
/**
* Returns an empty array.
*/
@Override
public BeanDefinition[] getInnerBeanDefinitions() {
return new BeanDefinition[0];
}
@@ -59,7 +56,6 @@ public abstract class AbstractComponentDefinition implements ComponentDefinition
/**
* Returns an empty array.
*/
@Override
public BeanReference[] getBeanReferences() {
return new BeanReference[0];
}

View File

@@ -73,7 +73,6 @@ public class AliasDefinition implements BeanMetadataElement {
return this.alias;
}
@Override
public final Object getSource() {
return this.source;
}

View File

@@ -94,27 +94,22 @@ public class BeanComponentDefinition extends BeanDefinitionHolder implements Com
}
@Override
public String getName() {
return getBeanName();
}
@Override
public String getDescription() {
return getShortDescription();
}
@Override
public BeanDefinition[] getBeanDefinitions() {
return new BeanDefinition[] {getBeanDefinition()};
}
@Override
public BeanDefinition[] getInnerBeanDefinitions() {
return this.innerBeanDefinitions;
}
@Override
public BeanReference[] getBeanReferences() {
return this.beanReferences;
}

View File

@@ -51,12 +51,10 @@ public class CompositeComponentDefinition extends AbstractComponentDefinition {
}
@Override
public String getName() {
return this.name;
}
@Override
public Object getSource() {
return this.source;
}

View File

@@ -25,22 +25,18 @@ package org.springframework.beans.factory.parsing;
*/
public class EmptyReaderEventListener implements ReaderEventListener {
@Override
public void defaultsRegistered(DefaultsDefinition defaultsDefinition) {
// no-op
}
@Override
public void componentRegistered(ComponentDefinition componentDefinition) {
// no-op
}
@Override
public void aliasRegistered(AliasDefinition aliasDefinition) {
// no-op
}
@Override
public void importProcessed(ImportDefinition importDefinition) {
// no-op
}

View File

@@ -55,7 +55,6 @@ public class FailFastProblemReporter implements ProblemReporter {
* that has occurred.
* @param problem the source of the error
*/
@Override
public void fatal(Problem problem) {
throw new BeanDefinitionParsingException(problem);
}
@@ -65,7 +64,6 @@ public class FailFastProblemReporter implements ProblemReporter {
* that has occurred.
* @param problem the source of the error
*/
@Override
public void error(Problem problem) {
throw new BeanDefinitionParsingException(problem);
}
@@ -74,7 +72,6 @@ public class FailFastProblemReporter implements ProblemReporter {
* Writes the supplied {@link Problem} to the {@link Log} at {@code WARN} level.
* @param problem the source of the warning
*/
@Override
public void warning(Problem problem) {
this.logger.warn(problem, problem.getRootCause());
}

View File

@@ -77,7 +77,6 @@ public class ImportDefinition implements BeanMetadataElement {
return this.actualResources;
}
@Override
public final Object getSource() {
return this.source;
}

View File

@@ -33,7 +33,6 @@ public class NullSourceExtractor implements SourceExtractor {
/**
* This implementation simply returns {@code null} for any input.
*/
@Override
public Object extractSource(Object sourceCandidate, Resource definitionResource) {
return null;
}

View File

@@ -39,7 +39,6 @@ public class PassThroughSourceExtractor implements SourceExtractor {
* @param sourceCandidate the source metadata
* @return the supplied {@code sourceCandidate}
*/
@Override
public Object extractSource(Object sourceCandidate, Resource definingResource) {
return sourceCandidate;
}

View File

@@ -280,7 +280,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
// Typical methods for creating and populating external bean instances
//-------------------------------------------------------------------------
@Override
@SuppressWarnings("unchecked")
public <T> T createBean(Class<T> beanClass) throws BeansException {
// Use prototype bean definition, to avoid registering bean as dependent bean.
@@ -290,7 +289,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
return (T) createBean(beanClass.getName(), bd, null);
}
@Override
public void autowireBean(Object existingBean) {
// Use non-singleton bean definition, to avoid registering bean as dependent bean.
RootBeanDefinition bd = new RootBeanDefinition(ClassUtils.getUserClass(existingBean));
@@ -301,7 +299,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
populateBean(bd.getBeanClass().getName(), bd, bw);
}
@Override
public Object configureBean(Object existingBean, String beanName) throws BeansException {
markBeanAsCreated(beanName);
BeanDefinition mbd = getMergedBeanDefinition(beanName);
@@ -323,7 +320,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
return initializeBean(beanName, existingBean, bd);
}
@Override
public Object resolveDependency(DependencyDescriptor descriptor, String beanName) throws BeansException {
return resolveDependency(descriptor, beanName, null, null);
}
@@ -333,7 +329,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
// Specialized methods for fine-grained control over the bean lifecycle
//-------------------------------------------------------------------------
@Override
public Object createBean(Class beanClass, int autowireMode, boolean dependencyCheck) throws BeansException {
// Use non-singleton bean definition, to avoid registering bean as dependent bean.
RootBeanDefinition bd = new RootBeanDefinition(beanClass, autowireMode, dependencyCheck);
@@ -341,7 +336,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
return createBean(beanClass.getName(), bd, null);
}
@Override
public Object autowire(Class beanClass, int autowireMode, boolean dependencyCheck) throws BeansException {
// Use non-singleton bean definition, to avoid registering bean as dependent bean.
final RootBeanDefinition bd = new RootBeanDefinition(beanClass, autowireMode, dependencyCheck);
@@ -356,7 +350,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
if (System.getSecurityManager() != null) {
bean = AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
return getInstantiationStrategy().instantiate(bd, null, parent);
}
@@ -371,7 +364,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
}
}
@Override
public void autowireBeanProperties(Object existingBean, int autowireMode, boolean dependencyCheck)
throws BeansException {
@@ -387,7 +379,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
populateBean(bd.getBeanClass().getName(), bd, bw);
}
@Override
public void applyBeanPropertyValues(Object existingBean, String beanName) throws BeansException {
markBeanAsCreated(beanName);
BeanDefinition bd = getMergedBeanDefinition(beanName);
@@ -396,12 +387,10 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
applyPropertyValues(beanName, bd, bw, bd.getPropertyValues());
}
@Override
public Object initializeBean(Object existingBean, String beanName) {
return initializeBean(beanName, existingBean, null);
}
@Override
public Object applyBeanPostProcessorsBeforeInitialization(Object existingBean, String beanName)
throws BeansException {
@@ -415,7 +404,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
return result;
}
@Override
public Object applyBeanPostProcessorsAfterInitialization(Object existingBean, String beanName)
throws BeansException {
@@ -522,7 +510,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
"' to allow for resolving potential circular references");
}
addSingletonFactory(beanName, new ObjectFactory() {
@Override
public Object getObject() throws BeansException {
return getEarlyBeanReference(beanName, mbd, bean);
}
@@ -708,7 +695,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
// @Bean methods, there may be parameters present.
ReflectionUtils.doWithMethods(fbClass,
new ReflectionUtils.MethodCallback() {
@Override
public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException {
if (method.getName().equals(factoryMethodName) &&
FactoryBean.class.isAssignableFrom(method.getReturnType())) {
@@ -1009,7 +995,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
final BeanFactory parent = this;
if (System.getSecurityManager() != null) {
beanInstance = AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
return getInstantiationStrategy().instantiate(mbd, beanName, parent);
}
@@ -1479,7 +1464,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
protected Object initializeBean(final String beanName, final Object bean, RootBeanDefinition mbd) {
if (System.getSecurityManager() != null) {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
invokeAwareMethods(beanName, bean);
return null;
@@ -1547,7 +1531,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
if (System.getSecurityManager() != null) {
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
@Override
public Object run() throws Exception {
((InitializingBean) bean).afterPropertiesSet();
return null;
@@ -1605,7 +1588,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
if (System.getSecurityManager() != null) {
AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
@Override
public Object run() throws Exception {
ReflectionUtils.makeAccessible(initMethod);
return null;
@@ -1613,7 +1595,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
});
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
@Override
public Object run() throws Exception {
initMethod.invoke(bean);
return null;

View File

@@ -386,12 +386,10 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
return (Class) beanClassObject;
}
@Override
public void setBeanClassName(String beanClassName) {
this.beanClass = beanClassName;
}
@Override
public String getBeanClassName() {
Object beanClassObject = this.beanClass;
if (beanClassObject instanceof Class) {
@@ -431,7 +429,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
* @see #SCOPE_SINGLETON
* @see #SCOPE_PROTOTYPE
*/
@Override
public void setScope(String scope) {
this.scope = scope;
this.singleton = SCOPE_SINGLETON.equals(scope) || SCOPE_DEFAULT.equals(scope);
@@ -441,7 +438,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/**
* Return the name of the target scope for the bean.
*/
@Override
public String getScope() {
return this.scope;
}
@@ -471,7 +467,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
* returned from all calls.
* @see #SCOPE_SINGLETON
*/
@Override
public boolean isSingleton() {
return this.singleton;
}
@@ -481,7 +476,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
* returned for each call.
* @see #SCOPE_PROTOTYPE
*/
@Override
public boolean isPrototype() {
return this.prototype;
}
@@ -500,7 +494,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
* Return whether this bean is "abstract", i.e. not meant to be instantiated
* itself but rather just serving as parent for concrete child bean definitions.
*/
@Override
public boolean isAbstract() {
return this.abstractFlag;
}
@@ -510,7 +503,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
* <p>If {@code false}, the bean will get instantiated on startup by bean
* factories that perform eager initialization of singletons.
*/
@Override
public void setLazyInit(boolean lazyInit) {
this.lazyInit = lazyInit;
}
@@ -519,7 +511,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
* Return whether this bean should be lazily initialized, i.e. not
* eagerly instantiated on startup. Only applicable to a singleton bean.
*/
@Override
public boolean isLazyInit() {
return this.lazyInit;
}
@@ -600,7 +591,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
* constructor arguments. This property should just be necessary for other kinds
* of dependencies like statics (*ugh*) or database preparation on startup.
*/
@Override
public void setDependsOn(String[] dependsOn) {
this.dependsOn = dependsOn;
}
@@ -608,7 +598,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/**
* Return the bean names that this bean depends on.
*/
@Override
public String[] getDependsOn() {
return this.dependsOn;
}
@@ -616,7 +605,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/**
* Set whether this bean is a candidate for getting autowired into some other bean.
*/
@Override
public void setAutowireCandidate(boolean autowireCandidate) {
this.autowireCandidate = autowireCandidate;
}
@@ -624,7 +612,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/**
* Return whether this bean is a candidate for getting autowired into some other bean.
*/
@Override
public boolean isAutowireCandidate() {
return this.autowireCandidate;
}
@@ -634,7 +621,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
* If this value is true for exactly one bean among multiple
* matching candidates, it will serve as a tie-breaker.
*/
@Override
public void setPrimary(boolean primary) {
this.primary = primary;
}
@@ -644,7 +630,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
* If this value is true for exactly one bean among multiple
* matching candidates, it will serve as a tie-breaker.
*/
@Override
public boolean isPrimary() {
return this.primary;
}
@@ -739,7 +724,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/**
* Return constructor argument values for this bean (never {@code null}).
*/
@Override
public ConstructorArgumentValues getConstructorArgumentValues() {
return this.constructorArgumentValues;
}
@@ -761,7 +745,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/**
* Return property values for this bean (never {@code null}).
*/
@Override
public MutablePropertyValues getPropertyValues() {
return this.propertyValues;
}
@@ -783,22 +766,18 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
}
@Override
public void setFactoryBeanName(String factoryBeanName) {
this.factoryBeanName = factoryBeanName;
}
@Override
public String getFactoryBeanName() {
return this.factoryBeanName;
}
@Override
public void setFactoryMethodName(String factoryMethodName) {
this.factoryMethodName = factoryMethodName;
}
@Override
public String getFactoryMethodName() {
return this.factoryMethodName;
}
@@ -895,7 +874,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/**
* Return the role hint for this {@code BeanDefinition}.
*/
@Override
public int getRole() {
return this.role;
}
@@ -908,7 +886,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
this.description = description;
}
@Override
public String getDescription() {
return this.description;
}
@@ -936,7 +913,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
this.resource = new DescriptiveResource(resourceDescription);
}
@Override
public String getResourceDescription() {
return (this.resource != null ? this.resource.getDescription() : null);
}
@@ -948,7 +924,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
this.resource = new BeanDefinitionResource(originatingBd);
}
@Override
public BeanDefinition getOriginatingBeanDefinition() {
return (this.resource instanceof BeanDefinitionResource ?
((BeanDefinitionResource) this.resource).getBeanDefinition() : null);

View File

@@ -102,7 +102,6 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable
return this.registry;
}
@Override
public final BeanDefinitionRegistry getRegistry() {
return this.registry;
}
@@ -122,7 +121,6 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable
this.resourceLoader = resourceLoader;
}
@Override
public ResourceLoader getResourceLoader() {
return this.resourceLoader;
}
@@ -138,7 +136,6 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable
this.beanClassLoader = beanClassLoader;
}
@Override
public ClassLoader getBeanClassLoader() {
return this.beanClassLoader;
}
@@ -152,7 +149,6 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable
this.environment = environment;
}
@Override
public Environment getEnvironment() {
return this.environment;
}
@@ -166,13 +162,11 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable
this.beanNameGenerator = (beanNameGenerator != null ? beanNameGenerator : new DefaultBeanNameGenerator());
}
@Override
public BeanNameGenerator getBeanNameGenerator() {
return this.beanNameGenerator;
}
@Override
public int loadBeanDefinitions(Resource... resources) throws BeanDefinitionStoreException {
Assert.notNull(resources, "Resource array must not be null");
int counter = 0;
@@ -182,7 +176,6 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable
return counter;
}
@Override
public int loadBeanDefinitions(String location) throws BeanDefinitionStoreException {
return loadBeanDefinitions(location, null);
}
@@ -243,7 +236,6 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable
}
}
@Override
public int loadBeanDefinitions(String... locations) throws BeanDefinitionStoreException {
Assert.notNull(locations, "Location array must not be null");
int counter = 0;

View File

@@ -190,17 +190,14 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
// Implementation of BeanFactory interface
//---------------------------------------------------------------------
@Override
public Object getBean(String name) throws BeansException {
return doGetBean(name, null, null, false);
}
@Override
public <T> T getBean(String name, Class<T> requiredType) throws BeansException {
return doGetBean(name, requiredType, null, false);
}
@Override
public Object getBean(String name, Object... args) throws BeansException {
return doGetBean(name, null, args, false);
}
@@ -293,7 +290,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
// Create bean instance.
if (mbd.isSingleton()) {
sharedInstance = getSingleton(beanName, new ObjectFactory<Object>() {
@Override
public Object getObject() throws BeansException {
try {
return createBean(beanName, mbd, args);
@@ -331,7 +327,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
}
try {
Object scopedInstance = scope.get(beanName, new ObjectFactory<Object>() {
@Override
public Object getObject() throws BeansException {
beforePrototypeCreation(beanName);
try {
@@ -369,7 +364,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
return (T) bean;
}
@Override
public boolean containsBean(String name) {
String beanName = transformedBeanName(name);
if (containsSingleton(beanName) || containsBeanDefinition(beanName)) {
@@ -380,7 +374,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
return (parentBeanFactory != null && parentBeanFactory.containsBean(originalBeanName(name)));
}
@Override
public boolean isSingleton(String name) throws NoSuchBeanDefinitionException {
String beanName = transformedBeanName(name);
@@ -426,7 +419,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
}
}
@Override
public boolean isPrototype(String name) throws NoSuchBeanDefinitionException {
String beanName = transformedBeanName(name);
@@ -451,7 +443,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
final FactoryBean<?> factoryBean = (FactoryBean<?>) getBean(FACTORY_BEAN_PREFIX + beanName);
if (System.getSecurityManager() != null) {
return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
@Override
public Boolean run() {
return ((factoryBean instanceof SmartFactoryBean && ((SmartFactoryBean<?>) factoryBean).isPrototype()) ||
!factoryBean.isSingleton());
@@ -469,7 +460,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
}
}
@Override
public boolean isTypeMatch(String name, Class<?> targetType) throws NoSuchBeanDefinitionException {
String beanName = transformedBeanName(name);
Class<?> typeToMatch = (targetType != null ? targetType : Object.class);
@@ -541,7 +531,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
}
}
@Override
public Class<?> getType(String name) throws NoSuchBeanDefinitionException {
String beanName = transformedBeanName(name);
@@ -632,12 +621,10 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
// Implementation of HierarchicalBeanFactory interface
//---------------------------------------------------------------------
@Override
public BeanFactory getParentBeanFactory() {
return this.parentBeanFactory;
}
@Override
public boolean containsLocalBean(String name) {
String beanName = transformedBeanName(name);
return ((containsSingleton(beanName) || containsBeanDefinition(beanName)) &&
@@ -649,7 +636,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
// Implementation of ConfigurableBeanFactory interface
//---------------------------------------------------------------------
@Override
public void setParentBeanFactory(BeanFactory parentBeanFactory) {
if (this.parentBeanFactory != null && this.parentBeanFactory != parentBeanFactory) {
throw new IllegalStateException("Already associated with parent BeanFactory: " + this.parentBeanFactory);
@@ -657,57 +643,46 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
this.parentBeanFactory = parentBeanFactory;
}
@Override
public void setBeanClassLoader(ClassLoader beanClassLoader) {
this.beanClassLoader = (beanClassLoader != null ? beanClassLoader : ClassUtils.getDefaultClassLoader());
}
@Override
public ClassLoader getBeanClassLoader() {
return this.beanClassLoader;
}
@Override
public void setTempClassLoader(ClassLoader tempClassLoader) {
this.tempClassLoader = tempClassLoader;
}
@Override
public ClassLoader getTempClassLoader() {
return this.tempClassLoader;
}
@Override
public void setCacheBeanMetadata(boolean cacheBeanMetadata) {
this.cacheBeanMetadata = cacheBeanMetadata;
}
@Override
public boolean isCacheBeanMetadata() {
return this.cacheBeanMetadata;
}
@Override
public void setBeanExpressionResolver(BeanExpressionResolver resolver) {
this.beanExpressionResolver = resolver;
}
@Override
public BeanExpressionResolver getBeanExpressionResolver() {
return this.beanExpressionResolver;
}
@Override
public void setConversionService(ConversionService conversionService) {
this.conversionService = conversionService;
}
@Override
public ConversionService getConversionService() {
return this.conversionService;
}
@Override
public void addPropertyEditorRegistrar(PropertyEditorRegistrar registrar) {
Assert.notNull(registrar, "PropertyEditorRegistrar must not be null");
this.propertyEditorRegistrars.add(registrar);
@@ -720,14 +695,12 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
return this.propertyEditorRegistrars;
}
@Override
public void registerCustomEditor(Class<?> requiredType, Class<? extends PropertyEditor> propertyEditorClass) {
Assert.notNull(requiredType, "Required type must not be null");
Assert.isAssignable(PropertyEditor.class, propertyEditorClass);
this.customEditors.put(requiredType, propertyEditorClass);
}
@Override
public void copyRegisteredEditorsTo(PropertyEditorRegistry registry) {
registerCustomEditors(registry);
}
@@ -739,7 +712,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
return this.customEditors;
}
@Override
public void setTypeConverter(TypeConverter typeConverter) {
this.typeConverter = typeConverter;
}
@@ -752,7 +724,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
return this.typeConverter;
}
@Override
public TypeConverter getTypeConverter() {
TypeConverter customConverter = getCustomTypeConverter();
if (customConverter != null) {
@@ -767,13 +738,11 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
}
}
@Override
public void addEmbeddedValueResolver(StringValueResolver valueResolver) {
Assert.notNull(valueResolver, "StringValueResolver must not be null");
this.embeddedValueResolvers.add(valueResolver);
}
@Override
public String resolveEmbeddedValue(String value) {
String result = value;
for (StringValueResolver resolver : this.embeddedValueResolvers) {
@@ -782,7 +751,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
return result;
}
@Override
public void addBeanPostProcessor(BeanPostProcessor beanPostProcessor) {
Assert.notNull(beanPostProcessor, "BeanPostProcessor must not be null");
this.beanPostProcessors.remove(beanPostProcessor);
@@ -795,7 +763,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
}
}
@Override
public int getBeanPostProcessorCount() {
return this.beanPostProcessors.size();
}
@@ -828,7 +795,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
return this.hasDestructionAwareBeanPostProcessors;
}
@Override
public void registerScope(String scopeName, Scope scope) {
Assert.notNull(scopeName, "Scope identifier must not be null");
Assert.notNull(scope, "Scope must not be null");
@@ -838,12 +804,10 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
this.scopes.put(scopeName, scope);
}
@Override
public String[] getRegisteredScopeNames() {
return StringUtils.toStringArray(this.scopes.keySet());
}
@Override
public Scope getRegisteredScope(String scopeName) {
Assert.notNull(scopeName, "Scope identifier must not be null");
return this.scopes.get(scopeName);
@@ -869,7 +833,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
AccessController.getContext());
}
@Override
public void copyConfigurationFrom(ConfigurableBeanFactory otherFactory) {
Assert.notNull(otherFactory, "BeanFactory must not be null");
setBeanClassLoader(otherFactory.getBeanClassLoader());
@@ -903,7 +866,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
* @throws NoSuchBeanDefinitionException if there is no bean with the given name
* @throws BeanDefinitionStoreException in case of an invalid bean definition
*/
@Override
public BeanDefinition getMergedBeanDefinition(String name) throws BeansException {
String beanName = transformedBeanName(name);
@@ -915,7 +877,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
return getMergedLocalBeanDefinition(beanName);
}
@Override
public boolean isFactoryBean(String name) throws NoSuchBeanDefinitionException {
String beanName = transformedBeanName(name);
@@ -998,7 +959,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
}
}
@Override
public void destroyBean(String beanName, Object beanInstance) {
destroyBean(beanName, beanInstance, getMergedLocalBeanDefinition(beanName));
}
@@ -1014,7 +974,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
new DisposableBeanAdapter(beanInstance, beanName, mbd, getBeanPostProcessors(), getAccessControlContext()).destroy();
}
@Override
public void destroyScopedBean(String beanName) {
RootBeanDefinition mbd = getMergedLocalBeanDefinition(beanName);
if (mbd.isSingleton() || mbd.isPrototype()) {
@@ -1287,7 +1246,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
}
if (System.getSecurityManager() != null) {
return AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>() {
@Override
public Class<?> run() throws Exception {
return doResolveBeanClass(mbd, typesToMatch);
}

View File

@@ -51,7 +51,6 @@ abstract class AutowireUtils {
*/
public static void sortConstructors(Constructor[] constructors) {
Arrays.sort(constructors, new Comparator<Constructor>() {
@Override
public int compare(Constructor c1, Constructor c2) {
boolean p1 = Modifier.isPublic(c1.getModifiers());
boolean p2 = Modifier.isPublic(c2.getModifiers());
@@ -74,7 +73,6 @@ abstract class AutowireUtils {
*/
public static void sortFactoryMethods(Method[] factoryMethods) {
Arrays.sort(factoryMethods, new Comparator<Method>() {
@Override
public int compare(Method fm1, Method fm2) {
boolean p1 = Modifier.isPublic(fm1.getModifiers());
boolean p2 = Modifier.isPublic(fm2.getModifiers());
@@ -164,7 +162,6 @@ abstract class AutowireUtils {
this.objectFactory = objectFactory;
}
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
String methodName = method.getName();
if (methodName.equals("equals")) {

View File

@@ -64,13 +64,11 @@ class BeanDefinitionResource extends AbstractResource {
return false;
}
@Override
public InputStream getInputStream() throws IOException {
throw new FileNotFoundException(
"Resource cannot be opened because it points to " + getDescription());
}
@Override
public String getDescription() {
return "BeanDefinition defined in " + this.beanDefinition.getResourceDescription();
}

View File

@@ -153,7 +153,6 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
*/
private class LookupOverrideMethodInterceptor extends CglibIdentitySupport implements MethodInterceptor {
@Override
public Object intercept(Object obj, Method method, Object[] args, MethodProxy mp) throws Throwable {
// Cast is safe, as CallbackFilter filters are used selectively.
LookupOverride lo = (LookupOverride) beanDefinition.getMethodOverrides().getOverride(method);
@@ -168,7 +167,6 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
*/
private class ReplaceOverrideMethodInterceptor extends CglibIdentitySupport implements MethodInterceptor {
@Override
public Object intercept(Object obj, Method method, Object[] args, MethodProxy mp) throws Throwable {
ReplaceOverride ro = (ReplaceOverride) beanDefinition.getMethodOverrides().getOverride(method);
// TODO could cache if a singleton for minor performance optimization
@@ -183,7 +181,6 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
*/
private class CallbackFilterImpl extends CglibIdentitySupport implements CallbackFilter {
@Override
public int accept(Method method) {
MethodOverride methodOverride = beanDefinition.getMethodOverrides().getOverride(method);
if (logger.isTraceEnabled()) {

View File

@@ -132,12 +132,10 @@ public class ChildBeanDefinition extends AbstractBeanDefinition {
}
@Override
public void setParentName(String parentName) {
this.parentName = parentName;
}
@Override
public String getParentName() {
return this.parentName;
}

View File

@@ -270,7 +270,6 @@ class ConstructorResolver {
final Constructor ctorToUse = constructorToUse;
final Object[] argumentsToUse = argsToUse;
beanInstance = AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
return beanFactory.getInstantiationStrategy().instantiate(
mbd, beanName, beanFactory, ctorToUse, argumentsToUse);
@@ -403,7 +402,6 @@ class ConstructorResolver {
final Class factoryClazz = factoryClass;
if (System.getSecurityManager() != null) {
rawCandidates = AccessController.doPrivileged(new PrivilegedAction<Method[]>() {
@Override
public Method[] run() {
return (mbd.isNonPublicAccessAllowed() ?
ReflectionUtils.getAllDeclaredMethods(factoryClazz) : factoryClazz.getMethods());
@@ -562,7 +560,6 @@ class ConstructorResolver {
final Method factoryMethod = factoryMethodToUse;
final Object[] args = argsToUse;
beanInstance = AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
return beanFactory.getInstantiationStrategy().instantiate(
mbd, beanName, beanFactory, fb, factoryMethod, args);

View File

@@ -27,7 +27,6 @@ import org.springframework.beans.factory.config.BeanDefinition;
*/
public class DefaultBeanNameGenerator implements BeanNameGenerator {
@Override
public String generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry) {
return BeanDefinitionReaderUtils.generateBeanName(definition, registry);
}

View File

@@ -215,7 +215,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
if (System.getSecurityManager() != null) {
final BeanFactory target = this;
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
((BeanFactoryAware) autowireCandidateResolver).setBeanFactory(target);
return null;
@@ -254,7 +253,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
// Implementation of ListableBeanFactory interface
//---------------------------------------------------------------------
@Override
public <T> T getBean(Class<T> requiredType) throws BeansException {
Assert.notNull(requiredType, "Required type must not be null");
String[] beanNames = getBeanNamesForType(requiredType);
@@ -287,12 +285,10 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
return this.beanDefinitionMap.containsKey(beanName);
}
@Override
public int getBeanDefinitionCount() {
return this.beanDefinitionMap.size();
}
@Override
public String[] getBeanDefinitionNames() {
synchronized (this.beanDefinitionMap) {
if (this.frozenBeanDefinitionNames != null) {
@@ -304,12 +300,10 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
}
}
@Override
public String[] getBeanNamesForType(Class<?> type) {
return getBeanNamesForType(type, true, true);
}
@Override
public String[] getBeanNamesForType(Class<?> type, boolean includeNonSingletons, boolean allowEagerInit) {
if (!isConfigurationFrozen() || type == null || !allowEagerInit) {
return doGetBeanNamesForType(type, includeNonSingletons, allowEagerInit);
@@ -413,12 +407,10 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
return (factoryBeanName != null && isFactoryBean(factoryBeanName) && !containsSingleton(factoryBeanName));
}
@Override
public <T> Map<String, T> getBeansOfType(Class<T> type) throws BeansException {
return getBeansOfType(type, true, true);
}
@Override
public <T> Map<String, T> getBeansOfType(Class<T> type, boolean includeNonSingletons, boolean allowEagerInit)
throws BeansException {
@@ -449,7 +441,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
return result;
}
@Override
public Map<String, Object> getBeansWithAnnotation(Class<? extends Annotation> annotationType) {
Set<String> beanNames = new LinkedHashSet<String>(getBeanDefinitionCount());
beanNames.addAll(Arrays.asList(getBeanDefinitionNames()));
@@ -469,7 +460,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
* found on the given class itself, as well as checking its raw bean class
* if not found on the exposed bean reference (e.g. in case of a proxy).
*/
@Override
public <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType) {
A ann = null;
Class<?> beanType = getType(beanName);
@@ -493,7 +483,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
// Implementation of ConfigurableListableBeanFactory interface
//---------------------------------------------------------------------
@Override
public void registerResolvableDependency(Class<?> dependencyType, Object autowiredValue) {
Assert.notNull(dependencyType, "Type must not be null");
if (autowiredValue != null) {
@@ -503,7 +492,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
}
}
@Override
public boolean isAutowireCandidate(String beanName, DependencyDescriptor descriptor)
throws NoSuchBeanDefinitionException {
@@ -564,7 +552,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
return bd;
}
@Override
public void freezeConfiguration() {
this.configurationFrozen = true;
synchronized (this.beanDefinitionMap) {
@@ -572,7 +559,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
}
}
@Override
public boolean isConfigurationFrozen() {
return this.configurationFrozen;
}
@@ -587,7 +573,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
return (this.configurationFrozen || super.isBeanEligibleForMetadataCaching(beanName));
}
@Override
public void preInstantiateSingletons() throws BeansException {
if (this.logger.isInfoEnabled()) {
this.logger.info("Pre-instantiating singletons in " + this);
@@ -606,7 +591,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
boolean isEagerInit;
if (System.getSecurityManager() != null && factory instanceof SmartFactoryBean) {
isEagerInit = AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
@Override
public Boolean run() {
return ((SmartFactoryBean<?>) factory).isEagerInit();
}
@@ -632,7 +616,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
// Implementation of BeanDefinitionRegistry interface
//---------------------------------------------------------------------
@Override
public void registerBeanDefinition(String beanName, BeanDefinition beanDefinition)
throws BeanDefinitionStoreException {
@@ -674,7 +657,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
resetBeanDefinition(beanName);
}
@Override
public void removeBeanDefinition(String beanName) throws NoSuchBeanDefinitionException {
Assert.hasText(beanName, "'beanName' must not be empty");
@@ -735,7 +717,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
// Dependency resolution functionality
//---------------------------------------------------------------------
@Override
public Object resolveDependency(DependencyDescriptor descriptor, String beanName,
Set<String> autowiredBeanNames, TypeConverter typeConverter) throws BeansException {
@@ -1051,7 +1032,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
this.beanName = beanName;
}
@Override
public Object getObject() throws BeansException {
return doResolveDependency(this.descriptor, this.descriptor.getDependencyType(), this.beanName, null, null);
}
@@ -1067,7 +1047,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
super(descriptor, beanName);
}
@Override
public Object get() throws BeansException {
return getObject();
}

View File

@@ -117,7 +117,6 @@ public class DefaultSingletonBeanRegistry extends SimpleAliasRegistry implements
private final Map<String, Set<String>> dependenciesForBeanMap = new ConcurrentHashMap<String, Set<String>>(64);
@Override
public void registerSingleton(String beanName, Object singletonObject) throws IllegalStateException {
Assert.notNull(beanName, "'beanName' must not be null");
synchronized (this.singletonObjects) {
@@ -164,7 +163,6 @@ public class DefaultSingletonBeanRegistry extends SimpleAliasRegistry implements
}
}
@Override
public Object getSingleton(String beanName) {
return getSingleton(beanName, true);
}
@@ -272,19 +270,16 @@ public class DefaultSingletonBeanRegistry extends SimpleAliasRegistry implements
}
}
@Override
public boolean containsSingleton(String beanName) {
return (this.singletonObjects.containsKey(beanName));
}
@Override
public String[] getSingletonNames() {
synchronized (this.singletonObjects) {
return StringUtils.toStringArray(this.registeredSingletons);
}
}
@Override
public int getSingletonCount() {
synchronized (this.singletonObjects) {
return this.registeredSingletons.size();

View File

@@ -203,12 +203,10 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
}
@Override
public void run() {
destroy();
}
@Override
public void destroy() {
if (this.beanPostProcessors != null && !this.beanPostProcessors.isEmpty()) {
for (DestructionAwareBeanPostProcessor processor : this.beanPostProcessors) {
@@ -223,7 +221,6 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
try {
if (System.getSecurityManager() != null) {
AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
@Override
public Object run() throws Exception {
((DisposableBean) bean).destroy();
return null;
@@ -261,7 +258,6 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
try {
if (System.getSecurityManager() != null) {
return AccessController.doPrivileged(new PrivilegedAction<Method>() {
@Override
public Method run() {
return findDestroyMethod();
}
@@ -302,7 +298,6 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
try {
if (System.getSecurityManager() != null) {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
ReflectionUtils.makeAccessible(destroyMethod);
return null;
@@ -310,7 +305,6 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
});
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
@Override
public Object run() throws Exception {
destroyMethod.invoke(bean, args);
return null;

View File

@@ -56,7 +56,6 @@ public abstract class FactoryBeanRegistrySupport extends DefaultSingletonBeanReg
try {
if (System.getSecurityManager() != null) {
return AccessController.doPrivileged(new PrivilegedAction<Class>() {
@Override
public Class run() {
return factoryBean.getObjectType();
}
@@ -130,7 +129,6 @@ public abstract class FactoryBeanRegistrySupport extends DefaultSingletonBeanReg
AccessControlContext acc = getAccessControlContext();
try {
object = AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
@Override
public Object run() throws Exception {
return factory.getObject();
}

View File

@@ -66,12 +66,10 @@ public class GenericBeanDefinition extends AbstractBeanDefinition {
}
@Override
public void setParentName(String parentName) {
this.parentName = parentName;
}
@Override
public String getParentName() {
return this.parentName;
}

View File

@@ -57,7 +57,6 @@ public class ManagedList<E> extends ArrayList<E> implements Mergeable, BeanMetad
this.source = source;
}
@Override
public Object getSource() {
return this.source;
}
@@ -84,12 +83,10 @@ public class ManagedList<E> extends ArrayList<E> implements Mergeable, BeanMetad
this.mergeEnabled = mergeEnabled;
}
@Override
public boolean isMergeEnabled() {
return this.mergeEnabled;
}
@Override
@SuppressWarnings("unchecked")
public List<E> merge(Object parent) {
if (!this.mergeEnabled) {

View File

@@ -58,7 +58,6 @@ public class ManagedMap<K, V> extends LinkedHashMap<K, V> implements Mergeable,
this.source = source;
}
@Override
public Object getSource() {
return this.source;
}
@@ -99,12 +98,10 @@ public class ManagedMap<K, V> extends LinkedHashMap<K, V> implements Mergeable,
this.mergeEnabled = mergeEnabled;
}
@Override
public boolean isMergeEnabled() {
return this.mergeEnabled;
}
@Override
@SuppressWarnings("unchecked")
public Object merge(Object parent) {
if (!this.mergeEnabled) {

View File

@@ -45,7 +45,6 @@ public class ManagedProperties extends Properties implements Mergeable, BeanMeta
this.source = source;
}
@Override
public Object getSource() {
return this.source;
}
@@ -58,13 +57,11 @@ public class ManagedProperties extends Properties implements Mergeable, BeanMeta
this.mergeEnabled = mergeEnabled;
}
@Override
public boolean isMergeEnabled() {
return this.mergeEnabled;
}
@Override
public Object merge(Object parent) {
if (!this.mergeEnabled) {
throw new IllegalStateException("Not allowed to merge when the 'mergeEnabled' property is set to 'false'");

View File

@@ -56,7 +56,6 @@ public class ManagedSet<E> extends LinkedHashSet<E> implements Mergeable, BeanMe
this.source = source;
}
@Override
public Object getSource() {
return this.source;
}
@@ -83,12 +82,10 @@ public class ManagedSet<E> extends LinkedHashSet<E> implements Mergeable, BeanMe
this.mergeEnabled = mergeEnabled;
}
@Override
public boolean isMergeEnabled() {
return this.mergeEnabled;
}
@Override
@SuppressWarnings("unchecked")
public Set<E> merge(Object parent) {
if (!this.mergeEnabled) {

View File

@@ -83,7 +83,6 @@ public abstract class MethodOverride implements BeanMetadataElement {
this.source = source;
}
@Override
public Object getSource() {
return this.source;
}

View File

@@ -204,7 +204,6 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader
* @throws BeanDefinitionStoreException in case of loading or parsing errors
* @see #loadBeanDefinitions(org.springframework.core.io.Resource, String)
*/
@Override
public int loadBeanDefinitions(Resource resource) throws BeanDefinitionStoreException {
return loadBeanDefinitions(new EncodedResource(resource), null);
}

View File

@@ -241,12 +241,10 @@ public class RootBeanDefinition extends AbstractBeanDefinition {
}
@Override
public String getParentName() {
return null;
}
@Override
public void setParentName(String parentName) {
if (parentName != null) {
throw new IllegalArgumentException("Root bean cannot be changed into a child bean with parent reference");

View File

@@ -37,12 +37,10 @@ public class SimpleAutowireCandidateResolver implements AutowireCandidateResolve
* <p>To be considered a candidate the bean's <em>autowire-candidate</em>
* attribute must not have been set to 'false'.
*/
@Override
public boolean isAutowireCandidate(BeanDefinitionHolder bdHolder, DependencyDescriptor descriptor) {
return bdHolder.getBeanDefinition().isAutowireCandidate();
}
@Override
public Object getSuggestedValue(DependencyDescriptor descriptor) {
return null;
}

View File

@@ -40,7 +40,6 @@ public class SimpleBeanDefinitionRegistry extends SimpleAliasRegistry implements
private final Map<String, BeanDefinition> beanDefinitionMap = new ConcurrentHashMap<String, BeanDefinition>(64);
@Override
public void registerBeanDefinition(String beanName, BeanDefinition beanDefinition)
throws BeanDefinitionStoreException {
@@ -49,14 +48,12 @@ public class SimpleBeanDefinitionRegistry extends SimpleAliasRegistry implements
this.beanDefinitionMap.put(beanName, beanDefinition);
}
@Override
public void removeBeanDefinition(String beanName) throws NoSuchBeanDefinitionException {
if (this.beanDefinitionMap.remove(beanName) == null) {
throw new NoSuchBeanDefinitionException(beanName);
}
}
@Override
public BeanDefinition getBeanDefinition(String beanName) throws NoSuchBeanDefinitionException {
BeanDefinition bd = this.beanDefinitionMap.get(beanName);
if (bd == null) {
@@ -65,22 +62,18 @@ public class SimpleBeanDefinitionRegistry extends SimpleAliasRegistry implements
return bd;
}
@Override
public boolean containsBeanDefinition(String beanName) {
return this.beanDefinitionMap.containsKey(beanName);
}
@Override
public String[] getBeanDefinitionNames() {
return StringUtils.toStringArray(this.beanDefinitionMap.keySet());
}
@Override
public int getBeanDefinitionCount() {
return this.beanDefinitionMap.size();
}
@Override
public boolean isBeanNameInUse(String beanName) {
return isAlias(beanName) || containsBeanDefinition(beanName);
}

View File

@@ -55,7 +55,6 @@ public class SimpleInstantiationStrategy implements InstantiationStrategy {
}
@Override
public Object instantiate(RootBeanDefinition beanDefinition, String beanName, BeanFactory owner) {
// Don't override the class with CGLIB if no overrides.
if (beanDefinition.getMethodOverrides().isEmpty()) {
@@ -70,7 +69,6 @@ public class SimpleInstantiationStrategy implements InstantiationStrategy {
try {
if (System.getSecurityManager() != null) {
constructorToUse = AccessController.doPrivileged(new PrivilegedExceptionAction<Constructor>() {
@Override
public Constructor run() throws Exception {
return clazz.getDeclaredConstructor((Class[]) null);
}
@@ -107,7 +105,6 @@ public class SimpleInstantiationStrategy implements InstantiationStrategy {
"Method Injection not supported in SimpleInstantiationStrategy");
}
@Override
public Object instantiate(RootBeanDefinition beanDefinition, String beanName, BeanFactory owner,
final Constructor<?> ctor, Object[] args) {
@@ -115,7 +112,6 @@ public class SimpleInstantiationStrategy implements InstantiationStrategy {
if (System.getSecurityManager() != null) {
// use own privileged to change accessibility (when security is on)
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
ReflectionUtils.makeAccessible(ctor);
return null;
@@ -142,14 +138,12 @@ public class SimpleInstantiationStrategy implements InstantiationStrategy {
"Method Injection not supported in SimpleInstantiationStrategy");
}
@Override
public Object instantiate(RootBeanDefinition beanDefinition, String beanName, BeanFactory owner,
Object factoryBean, final Method factoryMethod, Object[] args) {
try {
if (System.getSecurityManager() != null) {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
ReflectionUtils.makeAccessible(factoryMethod);
return null;

View File

@@ -51,7 +51,6 @@ public class SimpleSecurityContextProvider implements SecurityContextProvider {
}
@Override
public AccessControlContext getAccessControlContext() {
return (this.acc != null ? acc : AccessController.getContext());
}

View File

@@ -75,7 +75,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
// Implementation of BeanFactory interface
//---------------------------------------------------------------------
@Override
public Object getBean(String name) throws BeansException {
String beanName = BeanFactoryUtils.transformedBeanName(name);
Object bean = this.beans.get(beanName);
@@ -104,7 +103,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
}
}
@Override
@SuppressWarnings("unchecked")
public <T> T getBean(String name, Class<T> requiredType) throws BeansException {
Object bean = getBean(name);
@@ -114,7 +112,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
return (T) bean;
}
@Override
public <T> T getBean(Class<T> requiredType) throws BeansException {
String[] beanNames = getBeanNamesForType(requiredType);
if (beanNames.length == 1) {
@@ -125,7 +122,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
}
}
@Override
public Object getBean(String name, Object... args) throws BeansException {
if (args != null) {
throw new UnsupportedOperationException(
@@ -134,19 +130,16 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
return getBean(name);
}
@Override
public boolean containsBean(String name) {
return this.beans.containsKey(name);
}
@Override
public boolean isSingleton(String name) throws NoSuchBeanDefinitionException {
Object bean = getBean(name);
// In case of FactoryBean, return singleton status of created object.
return (bean instanceof FactoryBean && ((FactoryBean) bean).isSingleton());
}
@Override
public boolean isPrototype(String name) throws NoSuchBeanDefinitionException {
Object bean = getBean(name);
// In case of FactoryBean, return prototype status of created object.
@@ -154,13 +147,11 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
(bean instanceof FactoryBean && !((FactoryBean) bean).isSingleton()));
}
@Override
public boolean isTypeMatch(String name, Class targetType) throws NoSuchBeanDefinitionException {
Class type = getType(name);
return (targetType == null || (type != null && targetType.isAssignableFrom(type)));
}
@Override
public Class<?> getType(String name) throws NoSuchBeanDefinitionException {
String beanName = BeanFactoryUtils.transformedBeanName(name);
@@ -177,7 +168,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
return bean.getClass();
}
@Override
public String[] getAliases(String name) {
return new String[0];
}
@@ -187,27 +177,22 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
// Implementation of ListableBeanFactory interface
//---------------------------------------------------------------------
@Override
public boolean containsBeanDefinition(String name) {
return this.beans.containsKey(name);
}
@Override
public int getBeanDefinitionCount() {
return this.beans.size();
}
@Override
public String[] getBeanDefinitionNames() {
return StringUtils.toStringArray(this.beans.keySet());
}
@Override
public String[] getBeanNamesForType(Class type) {
return getBeanNamesForType(type, true, true);
}
@Override
public String[] getBeanNamesForType(Class type, boolean includeNonSingletons, boolean includeFactoryBeans) {
boolean isFactoryType = (type != null && FactoryBean.class.isAssignableFrom(type));
List<String> matches = new ArrayList<String>();
@@ -230,12 +215,10 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
return StringUtils.toStringArray(matches);
}
@Override
public <T> Map<String, T> getBeansOfType(Class<T> type) throws BeansException {
return getBeansOfType(type, true, true);
}
@Override
@SuppressWarnings("unchecked")
public <T> Map<String, T> getBeansOfType(Class<T> type, boolean includeNonSingletons, boolean includeFactoryBeans)
throws BeansException {
@@ -272,7 +255,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
return matches;
}
@Override
public Map<String, Object> getBeansWithAnnotation(Class<? extends Annotation> annotationType)
throws BeansException {
@@ -285,7 +267,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
return results;
}
@Override
public <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType) {
return AnnotationUtils.findAnnotation(getType(beanName), annotationType);
}

View File

@@ -72,7 +72,6 @@ public class BeanConfigurerSupport implements BeanFactoryAware, InitializingBean
/**
* Set the {@link BeanFactory} in which this aspect must configure beans.
*/
@Override
public void setBeanFactory(BeanFactory beanFactory) {
if (!(beanFactory instanceof ConfigurableListableBeanFactory)) {
throw new IllegalArgumentException(
@@ -97,7 +96,6 @@ public class BeanConfigurerSupport implements BeanFactoryAware, InitializingBean
/**
* Check that a {@link BeanFactory} has been set.
*/
@Override
public void afterPropertiesSet() {
Assert.notNull(this.beanFactory, "BeanFactory must be set");
}
@@ -106,7 +104,6 @@ public class BeanConfigurerSupport implements BeanFactoryAware, InitializingBean
* Release references to the {@link BeanFactory} and
* {@link BeanWiringInfoResolver} when the container is destroyed.
*/
@Override
public void destroy() {
this.beanFactory = null;
this.beanWiringInfoResolver = null;

View File

@@ -31,7 +31,6 @@ import org.springframework.util.ClassUtils;
*/
public class ClassNameBeanWiringInfoResolver implements BeanWiringInfoResolver {
@Override
public BeanWiringInfo resolveWiringInfo(Object beanInstance) {
Assert.notNull(beanInstance, "Bean instance must not be null");
return new BeanWiringInfo(ClassUtils.getUserClass(beanInstance).getName(), true);

View File

@@ -55,7 +55,6 @@ public abstract class AbstractBeanDefinitionParser implements BeanDefinitionPars
/** Constant for the name attribute */
public static final String NAME_ATTRIBUTE = "name";
@Override
public final BeanDefinition parse(Element element, ParserContext parserContext) {
AbstractBeanDefinition definition = parseInternal(element, parserContext);
if (definition != null && !parserContext.isNested()) {

View File

@@ -50,7 +50,6 @@ public class BeansDtdResolver implements EntityResolver {
private static final Log logger = LogFactory.getLog(BeansDtdResolver.class);
@Override
public InputSource resolveEntity(String publicId, String systemId) throws IOException {
if (logger.isTraceEnabled()) {
logger.trace("Trying to resolve XML entity with public ID [" + publicId +

View File

@@ -91,7 +91,6 @@ public class DefaultBeanDefinitionDocumentReader implements BeanDefinitionDocume
* {@code <beans/>} element with a {@code profile} attribute present.
* @see #doRegisterBeanDefinitions
*/
@Override
public void setEnvironment(Environment environment) {
this.environment = environment;
}
@@ -103,7 +102,6 @@ public class DefaultBeanDefinitionDocumentReader implements BeanDefinitionDocume
* <p>Opens a DOM Document; then initializes the default settings
* specified at the {@code <beans/>} level; then parses the contained bean definitions.
*/
@Override
public void registerBeanDefinitions(Document doc, XmlReaderContext readerContext) {
this.readerContext = readerContext;

View File

@@ -64,7 +64,6 @@ public class DefaultDocumentLoader implements DocumentLoader {
* Load the {@link Document} at the supplied {@link InputSource} using the standard JAXP-configured
* XML parser.
*/
@Override
public Document loadDocument(InputSource inputSource, EntityResolver entityResolver,
ErrorHandler errorHandler, int validationMode, boolean namespaceAware) throws Exception {

View File

@@ -109,7 +109,6 @@ public class DefaultNamespaceHandlerResolver implements NamespaceHandlerResolver
* @param namespaceUri the relevant namespace URI
* @return the located {@link NamespaceHandler}, or {@code null} if none found
*/
@Override
public NamespaceHandler resolve(String namespaceUri) {
Map<String, Object> handlerMappings = getHandlerMappings();
Object handlerOrClassName = handlerMappings.get(namespaceUri);

View File

@@ -76,7 +76,6 @@ public class DelegatingEntityResolver implements EntityResolver {
}
@Override
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
if (systemId != null) {
if (systemId.endsWith(DTD_SUFFIX)) {

View File

@@ -153,7 +153,6 @@ public class DocumentDefaultsDefinition implements DefaultsDefinition {
this.source = source;
}
@Override
public Object getSource() {
return this.source;
}

View File

@@ -69,7 +69,6 @@ public abstract class NamespaceHandlerSupport implements NamespaceHandler {
* Parses the supplied {@link Element} by delegating to the {@link BeanDefinitionParser} that is
* registered for that {@link Element}.
*/
@Override
public BeanDefinition parse(Element element, ParserContext parserContext) {
return findParserForElement(element, parserContext).parse(element, parserContext);
}
@@ -92,7 +91,6 @@ public abstract class NamespaceHandlerSupport implements NamespaceHandler {
* Decorates the supplied {@link Node} by delegating to the {@link BeanDefinitionDecorator} that
* is registered to handle that {@link Node}.
*/
@Override
public BeanDefinitionHolder decorate(
Node node, BeanDefinitionHolder definition, ParserContext parserContext) {

View File

@@ -100,7 +100,6 @@ public class PluggableSchemaResolver implements EntityResolver {
this.schemaMappingsLocation = schemaMappingsLocation;
}
@Override
public InputSource resolveEntity(String publicId, String systemId) throws IOException {
if (logger.isTraceEnabled()) {
logger.trace("Trying to resolve XML entity with public id [" + publicId +

View File

@@ -59,18 +59,15 @@ public class SimpleConstructorNamespaceHandler implements NamespaceHandler {
private static final String REF_SUFFIX = "-ref";
private static final String DELIMITER_PREFIX = "_";
@Override
public void init() {
}
@Override
public BeanDefinition parse(Element element, ParserContext parserContext) {
parserContext.getReaderContext().error(
"Class [" + getClass().getName() + "] does not support custom elements.", element);
return null;
}
@Override
public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) {
if (node instanceof Attr) {
Attr attr = (Attr) node;

View File

@@ -52,18 +52,15 @@ public class SimplePropertyNamespaceHandler implements NamespaceHandler {
private static final String REF_SUFFIX = "-ref";
@Override
public void init() {
}
@Override
public BeanDefinition parse(Element element, ParserContext parserContext) {
parserContext.getReaderContext().error(
"Class [" + getClass().getName() + "] does not support custom elements.", element);
return null;
}
@Override
public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) {
if (node instanceof Attr) {
Attr attr = (Attr) node;

View File

@@ -45,7 +45,6 @@ public class UtilNamespaceHandler extends NamespaceHandlerSupport {
private static final String SCOPE_ATTRIBUTE = "scope";
@Override
public void init() {
registerBeanDefinitionParser("constant", new ConstantBeanDefinitionParser());
registerBeanDefinitionParser("property-path", new PropertyPathBeanDefinitionParser());

View File

@@ -298,7 +298,6 @@ public class XmlBeanDefinitionReader extends AbstractBeanDefinitionReader {
* @return the number of bean definitions found
* @throws BeanDefinitionStoreException in case of loading or parsing errors
*/
@Override
public int loadBeanDefinitions(Resource resource) throws BeanDefinitionStoreException {
return loadBeanDefinitions(new EncodedResource(resource));
}

View File

@@ -104,7 +104,6 @@ public class MutableSortDefinition implements SortDefinition, Serializable {
}
}
@Override
public String getProperty() {
return this.property;
}
@@ -116,7 +115,6 @@ public class MutableSortDefinition implements SortDefinition, Serializable {
this.ignoreCase = ignoreCase;
}
@Override
public boolean isIgnoreCase() {
return this.ignoreCase;
}
@@ -128,7 +126,6 @@ public class MutableSortDefinition implements SortDefinition, Serializable {
this.ascending = ascending;
}
@Override
public boolean isAscending() {
return this.ascending;
}

View File

@@ -72,7 +72,6 @@ public class PropertyComparator implements Comparator {
}
@Override
public int compare(Object o1, Object o2) {
Object v1 = getPropertyValue(o1);
Object v2 = getPropertyValue(o2);

View File

@@ -106,7 +106,6 @@ public class ResourceEditorRegistrar implements PropertyEditorRegistrar {
* @see org.springframework.beans.propertyeditors.ClassArrayEditor
* @see org.springframework.core.io.support.ResourceArrayPropertyEditor
*/
@Override
public void registerCustomEditors(PropertyEditorRegistry registry) {
ResourceEditor baseEditor = new ResourceEditor(this.resourceLoader, this.propertyResolver);
doRegisterEditor(registry, Resource.class, baseEditor);