diff --git a/spring-aop/src/main/java/org/aopalliance/intercept/MethodInterceptor.java b/spring-aop/src/main/java/org/aopalliance/intercept/MethodInterceptor.java index c08fd7443f..8239b0e63b 100644 --- a/spring-aop/src/main/java/org/aopalliance/intercept/MethodInterceptor.java +++ b/spring-aop/src/main/java/org/aopalliance/intercept/MethodInterceptor.java @@ -39,6 +39,7 @@ package org.aopalliance.intercept; * * @author Rod Johnson */ +@FunctionalInterface public interface MethodInterceptor extends Interceptor { /** diff --git a/spring-aop/src/main/java/org/springframework/aop/ClassFilter.java b/spring-aop/src/main/java/org/springframework/aop/ClassFilter.java index 9cb86c02c0..822515f759 100644 --- a/spring-aop/src/main/java/org/springframework/aop/ClassFilter.java +++ b/spring-aop/src/main/java/org/springframework/aop/ClassFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ package org.springframework.aop; * @see Pointcut * @see MethodMatcher */ +@FunctionalInterface public interface ClassFilter { /** diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/TargetSourceCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/TargetSourceCreator.java index 67f9638ce4..a962c3518b 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/TargetSourceCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/TargetSourceCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ import org.springframework.aop.TargetSource; * @author Rod Johnson * @author Juergen Hoeller */ +@FunctionalInterface public interface TargetSourceCreator { /** diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncUncaughtExceptionHandler.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncUncaughtExceptionHandler.java index 933e3024c5..2914e53ef5 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncUncaughtExceptionHandler.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncUncaughtExceptionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ import java.lang.reflect.Method; * @author Stephane Nicoll * @since 4.1 */ +@FunctionalInterface public interface AsyncUncaughtExceptionHandler { /** diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanFactoryPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanFactoryPostProcessor.java index 8cfbb7645f..e0d5b07e75 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanFactoryPostProcessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanFactoryPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,7 @@ import org.springframework.beans.BeansException; * @see BeanPostProcessor * @see PropertyResourceConfigurer */ +@FunctionalInterface public interface BeanFactoryPostProcessor { /** diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/SourceExtractor.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/SourceExtractor.java index 0b0fe96658..ed9248fdf2 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/SourceExtractor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/SourceExtractor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,7 @@ import org.springframework.core.io.Resource; * @see org.springframework.beans.BeanMetadataElement#getSource() * @see org.springframework.beans.factory.config.BeanDefinition */ +@FunctionalInterface public interface SourceExtractor { /** diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandlerResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandlerResolver.java index d8ccc41050..7874ed2f19 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandlerResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandlerResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ package org.springframework.beans.factory.xml; * @see NamespaceHandler * @see org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader */ +@FunctionalInterface public interface NamespaceHandlerResolver { /** diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessagePreparator.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessagePreparator.java index 2740bc19c7..4aa82246af 100644 --- a/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessagePreparator.java +++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessagePreparator.java @@ -36,6 +36,7 @@ import javax.mail.internet.MimeMessage; * @see JavaMailSender#send(MimeMessagePreparator[]) * @see MimeMessageHelper */ +@FunctionalInterface public interface MimeMessagePreparator { /** diff --git a/spring-context/src/main/java/org/springframework/cache/Cache.java b/spring-context/src/main/java/org/springframework/cache/Cache.java index ebd2602047..3124461b2e 100644 --- a/spring-context/src/main/java/org/springframework/cache/Cache.java +++ b/spring-context/src/main/java/org/springframework/cache/Cache.java @@ -145,6 +145,7 @@ public interface Cache { /** * A (wrapper) object representing a cache value. */ + @FunctionalInterface interface ValueWrapper { /** diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/AnnotationCacheOperationSource.java b/spring-context/src/main/java/org/springframework/cache/annotation/AnnotationCacheOperationSource.java index 858bbbbc27..f685cc2b67 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/AnnotationCacheOperationSource.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/AnnotationCacheOperationSource.java @@ -181,6 +181,7 @@ public class AnnotationCacheOperationSource extends AbstractFallbackCacheOperati * Callback interface providing {@link CacheOperation} instance(s) based on * a given {@link CacheAnnotationParser}. */ + @FunctionalInterface protected interface CacheOperationProvider { /** diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvoker.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvoker.java index 8901ba1945..aa5d50452b 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvoker.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationInvoker.java @@ -27,6 +27,7 @@ package org.springframework.cache.interceptor; * @author Stephane Nicoll * @since 4.1 */ +@FunctionalInterface public interface CacheOperationInvoker { /** diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheResolver.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheResolver.java index 4bf2fd02e6..8b5b4be833 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheResolver.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ import org.springframework.cache.Cache; * @author Stephane Nicoll * @since 4.1 */ +@FunctionalInterface public interface CacheResolver { /** diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/KeyGenerator.java b/spring-context/src/main/java/org/springframework/cache/interceptor/KeyGenerator.java index ad34f5b20a..0dbf048bf5 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/KeyGenerator.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/KeyGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ import java.lang.reflect.Method; * @author Phillip Webb * @since 3.1 */ +@FunctionalInterface public interface KeyGenerator { /** diff --git a/spring-context/src/main/java/org/springframework/context/ApplicationListener.java b/spring-context/src/main/java/org/springframework/context/ApplicationListener.java index 54d22825ff..8cb0262f07 100644 --- a/spring-context/src/main/java/org/springframework/context/ApplicationListener.java +++ b/spring-context/src/main/java/org/springframework/context/ApplicationListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,7 @@ import java.util.EventListener; * @param the specific ApplicationEvent subclass to listen to * @see org.springframework.context.event.ApplicationEventMulticaster */ +@FunctionalInterface public interface ApplicationListener extends EventListener { /** diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Condition.java b/spring-context/src/main/java/org/springframework/context/annotation/Condition.java index edc6c05b70..2cdcc36cb8 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/Condition.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/Condition.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,6 +38,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata; * @see Conditional * @see ConditionContext */ +@FunctionalInterface public interface Condition { /** diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java index 52c27a3ce0..f239b2158e 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java @@ -151,6 +151,7 @@ class ConfigurationClassEnhancer { * must remain public in order to allow access to subclasses generated from other * packages (i.e. user code). */ + @FunctionalInterface public interface EnhancedConfiguration extends BeanFactoryAware { } @@ -159,6 +160,7 @@ class ConfigurationClassEnhancer { * Conditional {@link Callback}. * @see ConditionalCallbackFilter */ + @FunctionalInterface private interface ConditionalCallback extends Callback { boolean isMatch(Method candidateMethod); diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadataResolver.java b/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadataResolver.java index 04fda90705..0020b96e84 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadataResolver.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadataResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import org.springframework.beans.factory.config.BeanDefinition; * @since 2.5 * @see org.springframework.context.annotation.Scope */ +@FunctionalInterface public interface ScopeMetadataResolver { /** diff --git a/spring-context/src/main/java/org/springframework/format/Parser.java b/spring-context/src/main/java/org/springframework/format/Parser.java index ed62cc4e10..f856ad9516 100644 --- a/spring-context/src/main/java/org/springframework/format/Parser.java +++ b/spring-context/src/main/java/org/springframework/format/Parser.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ import java.util.Locale; * @since 3.0 * @param the type of object this Parser produces */ +@FunctionalInterface public interface Parser { /** diff --git a/spring-context/src/main/java/org/springframework/format/Printer.java b/spring-context/src/main/java/org/springframework/format/Printer.java index ce2d5d85a8..582735e113 100644 --- a/spring-context/src/main/java/org/springframework/format/Printer.java +++ b/spring-context/src/main/java/org/springframework/format/Printer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import java.util.Locale; * @since 3.0 * @param the type of object this Printer prints */ +@FunctionalInterface public interface Printer { /** diff --git a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java index c50ceb6228..c58632be43 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java @@ -1077,7 +1077,8 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo /** * Internal callback interface for the autodetection process. */ - private static interface AutodetectCallback { + @FunctionalInterface + private interface AutodetectCallback { /** * Called during the autodetection process to decide whether diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/ObjectNamingStrategy.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/ObjectNamingStrategy.java index cfbda068c0..8ff3511946 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/naming/ObjectNamingStrategy.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/ObjectNamingStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ import javax.management.ObjectName; * @see org.springframework.jmx.export.MBeanExporter * @see javax.management.ObjectName */ +@FunctionalInterface public interface ObjectNamingStrategy { /** diff --git a/spring-context/src/main/java/org/springframework/jmx/export/notification/NotificationPublisher.java b/spring-context/src/main/java/org/springframework/jmx/export/notification/NotificationPublisher.java index 068b7a5a60..85e6feae91 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/notification/NotificationPublisher.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/notification/NotificationPublisher.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,7 @@ import javax.management.Notification; * @see NotificationPublisherAware * @see org.springframework.jmx.export.MBeanExporter */ +@FunctionalInterface public interface NotificationPublisher { /** diff --git a/spring-context/src/main/java/org/springframework/jndi/JndiCallback.java b/spring-context/src/main/java/org/springframework/jndi/JndiCallback.java index c7845ec84c..c6c76826f7 100644 --- a/spring-context/src/main/java/org/springframework/jndi/JndiCallback.java +++ b/spring-context/src/main/java/org/springframework/jndi/JndiCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,7 @@ import javax.naming.NamingException; * @see JndiTemplate * @see org.springframework.jdbc.core.JdbcTemplate */ +@FunctionalInterface public interface JndiCallback { /** diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/SchedulingConfigurer.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/SchedulingConfigurer.java index 095ff700a7..f782a970ed 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/annotation/SchedulingConfigurer.java +++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/SchedulingConfigurer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +36,7 @@ import org.springframework.scheduling.config.ScheduledTaskRegistrar; * @see EnableScheduling * @see ScheduledTaskRegistrar */ +@FunctionalInterface public interface SchedulingConfigurer { /** diff --git a/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyObjectCustomizer.java b/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyObjectCustomizer.java index cb4f5b1c17..7d1adabe80 100644 --- a/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyObjectCustomizer.java +++ b/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyObjectCustomizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ import groovy.lang.GroovyObject; * @since 2.0.2 * @see GroovyScriptFactory */ +@FunctionalInterface public interface GroovyObjectCustomizer { /** diff --git a/spring-core/src/main/java/org/springframework/core/MethodIntrospector.java b/spring-core/src/main/java/org/springframework/core/MethodIntrospector.java index dbd594c463..0f8e396556 100644 --- a/spring-core/src/main/java/org/springframework/core/MethodIntrospector.java +++ b/spring-core/src/main/java/org/springframework/core/MethodIntrospector.java @@ -146,6 +146,7 @@ public abstract class MethodIntrospector { * A callback interface for metadata lookup on a given method. * @param the type of metadata returned */ + @FunctionalInterface public interface MetadataLookup { /** diff --git a/spring-core/src/main/java/org/springframework/core/OrderComparator.java b/spring-core/src/main/java/org/springframework/core/OrderComparator.java index 3d976d94af..39e27ac56c 100644 --- a/spring-core/src/main/java/org/springframework/core/OrderComparator.java +++ b/spring-core/src/main/java/org/springframework/core/OrderComparator.java @@ -203,6 +203,7 @@ public class OrderComparator implements Comparator { * Strategy interface to provide an order source for a given object. * @since 4.1 */ + @FunctionalInterface public interface OrderSourceProvider { /** diff --git a/spring-core/src/main/java/org/springframework/core/convert/converter/Converter.java b/spring-core/src/main/java/org/springframework/core/convert/converter/Converter.java index 0223b5d400..0d3c5dc14f 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/converter/Converter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/converter/Converter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ package org.springframework.core.convert.converter; * @param the source type * @param the target type */ +@FunctionalInterface public interface Converter { /** diff --git a/spring-core/src/main/java/org/springframework/core/io/ProtocolResolver.java b/spring-core/src/main/java/org/springframework/core/io/ProtocolResolver.java index 700c866e7f..6d808c37c3 100644 --- a/spring-core/src/main/java/org/springframework/core/io/ProtocolResolver.java +++ b/spring-core/src/main/java/org/springframework/core/io/ProtocolResolver.java @@ -27,6 +27,7 @@ package org.springframework.core.io; * @since 4.3 * @see DefaultResourceLoader#addProtocolResolver */ +@FunctionalInterface public interface ProtocolResolver { /** diff --git a/spring-core/src/main/java/org/springframework/core/serializer/Deserializer.java b/spring-core/src/main/java/org/springframework/core/serializer/Deserializer.java index f64fbdf762..5cc8a9d195 100644 --- a/spring-core/src/main/java/org/springframework/core/serializer/Deserializer.java +++ b/spring-core/src/main/java/org/springframework/core/serializer/Deserializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ import java.io.InputStream; * @author Mark Fisher * @since 3.0.5 */ +@FunctionalInterface public interface Deserializer { /** diff --git a/spring-core/src/main/java/org/springframework/core/serializer/Serializer.java b/spring-core/src/main/java/org/springframework/core/serializer/Serializer.java index 8af6519524..70f329cdc8 100644 --- a/spring-core/src/main/java/org/springframework/core/serializer/Serializer.java +++ b/spring-core/src/main/java/org/springframework/core/serializer/Serializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ import java.io.OutputStream; * @author Mark Fisher * @since 3.0.5 */ +@FunctionalInterface public interface Serializer { /** diff --git a/spring-core/src/main/java/org/springframework/core/task/TaskDecorator.java b/spring-core/src/main/java/org/springframework/core/task/TaskDecorator.java index d36a3ab391..d61b584f52 100644 --- a/spring-core/src/main/java/org/springframework/core/task/TaskDecorator.java +++ b/spring-core/src/main/java/org/springframework/core/task/TaskDecorator.java @@ -32,6 +32,7 @@ package org.springframework.core.task; * @see TaskExecutor#execute(Runnable) * @see SimpleAsyncTaskExecutor#setTaskDecorator */ +@FunctionalInterface public interface TaskDecorator { /** diff --git a/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java index bf8b9f910e..573cb02abf 100644 --- a/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java +++ b/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ import java.util.concurrent.Executor; * @since 2.0 * @see java.util.concurrent.Executor */ +@FunctionalInterface public interface TaskExecutor extends Executor { /** diff --git a/spring-core/src/main/java/org/springframework/core/type/filter/TypeFilter.java b/spring-core/src/main/java/org/springframework/core/type/filter/TypeFilter.java index bdcf33524d..5bd4d1b22d 100644 --- a/spring-core/src/main/java/org/springframework/core/type/filter/TypeFilter.java +++ b/spring-core/src/main/java/org/springframework/core/type/filter/TypeFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ import org.springframework.core.type.classreading.MetadataReaderFactory; * @author Mark Fisher * @since 2.5 */ +@FunctionalInterface public interface TypeFilter { /** diff --git a/spring-core/src/main/java/org/springframework/util/AutoPopulatingList.java b/spring-core/src/main/java/org/springframework/util/AutoPopulatingList.java index 1f42d01def..0d10f6a1f8 100644 --- a/spring-core/src/main/java/org/springframework/util/AutoPopulatingList.java +++ b/spring-core/src/main/java/org/springframework/util/AutoPopulatingList.java @@ -243,6 +243,7 @@ public class AutoPopulatingList implements List, Serializable { * Factory interface for creating elements for an index-based access * data structure such as a {@link java.util.List}. */ + @FunctionalInterface public interface ElementFactory { /** diff --git a/spring-core/src/main/java/org/springframework/util/ErrorHandler.java b/spring-core/src/main/java/org/springframework/util/ErrorHandler.java index a43ee8b659..506777ef0f 100644 --- a/spring-core/src/main/java/org/springframework/util/ErrorHandler.java +++ b/spring-core/src/main/java/org/springframework/util/ErrorHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ package org.springframework.util; * @author Mark Fisher * @since 3.0 */ +@FunctionalInterface public interface ErrorHandler { /** diff --git a/spring-core/src/main/java/org/springframework/util/PropertyPlaceholderHelper.java b/spring-core/src/main/java/org/springframework/util/PropertyPlaceholderHelper.java index 206b147c78..094173916e 100644 --- a/spring-core/src/main/java/org/springframework/util/PropertyPlaceholderHelper.java +++ b/spring-core/src/main/java/org/springframework/util/PropertyPlaceholderHelper.java @@ -212,7 +212,8 @@ public class PropertyPlaceholderHelper { /** * Strategy interface used to resolve replacement values for placeholders contained in Strings. */ - public static interface PlaceholderResolver { + @FunctionalInterface + public interface PlaceholderResolver { /** * Resolve the supplied placeholder name to the replacement value. diff --git a/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java b/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java index fd2df57be1..558db14321 100644 --- a/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java +++ b/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java @@ -755,6 +755,7 @@ public abstract class ReflectionUtils { /** * Action to take on each method. */ + @FunctionalInterface public interface MethodCallback { /** @@ -768,6 +769,7 @@ public abstract class ReflectionUtils { /** * Callback optionally used to filter methods to be operated on by a method callback. */ + @FunctionalInterface public interface MethodFilter { /** @@ -781,6 +783,7 @@ public abstract class ReflectionUtils { /** * Callback interface invoked on each field in the hierarchy. */ + @FunctionalInterface public interface FieldCallback { /** @@ -794,6 +797,7 @@ public abstract class ReflectionUtils { /** * Callback optionally used to filter fields to be operated on by a field callback. */ + @FunctionalInterface public interface FieldFilter { /** diff --git a/spring-core/src/main/java/org/springframework/util/StringValueResolver.java b/spring-core/src/main/java/org/springframework/util/StringValueResolver.java index acc77c1e64..fe7799d3fc 100644 --- a/spring-core/src/main/java/org/springframework/util/StringValueResolver.java +++ b/spring-core/src/main/java/org/springframework/util/StringValueResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ package org.springframework.util; * @see org.springframework.beans.factory.config.BeanDefinitionVisitor#BeanDefinitionVisitor(StringValueResolver) * @see org.springframework.beans.factory.config.PropertyPlaceholderConfigurer */ +@FunctionalInterface public interface StringValueResolver { /** diff --git a/spring-core/src/main/java/org/springframework/util/backoff/BackOff.java b/spring-core/src/main/java/org/springframework/util/backoff/BackOff.java index 0543ac917a..f3bc0ac615 100644 --- a/spring-core/src/main/java/org/springframework/util/backoff/BackOff.java +++ b/spring-core/src/main/java/org/springframework/util/backoff/BackOff.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,6 +43,7 @@ package org.springframework.util.backoff; * @since 4.1 * @see BackOffExecution */ +@FunctionalInterface public interface BackOff { /** diff --git a/spring-core/src/main/java/org/springframework/util/backoff/BackOffExecution.java b/spring-core/src/main/java/org/springframework/util/backoff/BackOffExecution.java index 4204285ceb..117bbd7f9f 100644 --- a/spring-core/src/main/java/org/springframework/util/backoff/BackOffExecution.java +++ b/spring-core/src/main/java/org/springframework/util/backoff/BackOffExecution.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ package org.springframework.util.backoff; * @since 4.1 * @see BackOff */ +@FunctionalInterface public interface BackOffExecution { /** diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/FailureCallback.java b/spring-core/src/main/java/org/springframework/util/concurrent/FailureCallback.java index 20f2142024..f3304d0f8b 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/FailureCallback.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/FailureCallback.java @@ -22,6 +22,7 @@ package org.springframework.util.concurrent; * @author Sebastien Deleuze * @since 4.1 */ +@FunctionalInterface public interface FailureCallback { /** diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/SuccessCallback.java b/spring-core/src/main/java/org/springframework/util/concurrent/SuccessCallback.java index b20bcad137..bd1930c9e4 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/SuccessCallback.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/SuccessCallback.java @@ -22,6 +22,7 @@ package org.springframework.util.concurrent; * @author Sebastien Deleuze * @since 4.1 */ +@FunctionalInterface public interface SuccessCallback { /** diff --git a/spring-expression/src/main/java/org/springframework/expression/ConstructorResolver.java b/spring-expression/src/main/java/org/springframework/expression/ConstructorResolver.java index 0019e8c3b1..30255ac2e6 100644 --- a/spring-expression/src/main/java/org/springframework/expression/ConstructorResolver.java +++ b/spring-expression/src/main/java/org/springframework/expression/ConstructorResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ import org.springframework.core.convert.TypeDescriptor; * @author Andy Clement * @since 3.0 */ +@FunctionalInterface public interface ConstructorResolver { /** diff --git a/spring-expression/src/main/java/org/springframework/expression/MethodFilter.java b/spring-expression/src/main/java/org/springframework/expression/MethodFilter.java index d7c6e20cbd..3cd2afef41 100644 --- a/spring-expression/src/main/java/org/springframework/expression/MethodFilter.java +++ b/spring-expression/src/main/java/org/springframework/expression/MethodFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ import java.util.List; * @author Andy Clement * @since 3.0.1 */ +@FunctionalInterface public interface MethodFilter { /** diff --git a/spring-expression/src/main/java/org/springframework/expression/TypeLocator.java b/spring-expression/src/main/java/org/springframework/expression/TypeLocator.java index e969626895..87018b4eaa 100644 --- a/spring-expression/src/main/java/org/springframework/expression/TypeLocator.java +++ b/spring-expression/src/main/java/org/springframework/expression/TypeLocator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ package org.springframework.expression; * @author Andy Clement * @since 3.0 */ +@FunctionalInterface public interface TypeLocator { /** diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java b/spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java index c503ea94a4..bdb9e2e60d 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java @@ -838,12 +838,14 @@ public class CodeFlow implements Opcodes { return clazzName; } + @FunctionalInterface public interface FieldAdder { - public void generateField(ClassWriter cw, CodeFlow codeflow); + void generateField(ClassWriter cw, CodeFlow codeflow); } + @FunctionalInterface public interface ClinitAdder { - public void generateCode(MethodVisitor mv, CodeFlow codeflow); + void generateCode(MethodVisitor mv, CodeFlow codeflow); } /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCallback.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCallback.java index 8ce3abbf35..434e243737 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCallback.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,6 +40,7 @@ import org.springframework.dao.DataAccessException; * @see JdbcTemplate#execute(String, CallableStatementCallback) * @see JdbcTemplate#execute(CallableStatementCreator, CallableStatementCallback) */ +@FunctionalInterface public interface CallableStatementCallback { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreator.java index b4175b8602..920640214e 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,6 +40,7 @@ import java.sql.SQLException; * @see JdbcTemplate#call * @see SqlProvider */ +@FunctionalInterface public interface CallableStatementCreator { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ConnectionCallback.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ConnectionCallback.java index 55a63039c3..7c99bdc01a 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ConnectionCallback.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ConnectionCallback.java @@ -37,6 +37,7 @@ import org.springframework.dao.DataAccessException; * @see JdbcTemplate#query * @see JdbcTemplate#update */ +@FunctionalInterface public interface ConnectionCallback { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterMapper.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterMapper.java index e333c73875..8198084ee2 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterMapper.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ import java.util.Map; * @see CallableStatementCreatorFactory#newCallableStatementCreator(ParameterMapper) * @see org.springframework.jdbc.object.StoredProcedure#execute(ParameterMapper) */ +@FunctionalInterface public interface ParameterMapper { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterizedPreparedStatementSetter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterizedPreparedStatementSetter.java index 500e1523e4..b69439d6f4 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterizedPreparedStatementSetter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterizedPreparedStatementSetter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,6 +37,7 @@ import java.sql.SQLException; * @since 3.1 * @see JdbcTemplate#batchUpdate(String, java.util.Collection, int, ParameterizedPreparedStatementSetter) */ +@FunctionalInterface public interface ParameterizedPreparedStatementSetter { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCallback.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCallback.java index 9c2cd0e9be..3db375c7b9 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCallback.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCallback.java @@ -40,6 +40,7 @@ import org.springframework.dao.DataAccessException; * @see JdbcTemplate#execute(String, PreparedStatementCallback) * @see JdbcTemplate#execute(PreparedStatementCreator, PreparedStatementCallback) */ +@FunctionalInterface public interface PreparedStatementCallback { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreator.java index ee123ceed9..c6f39075fb 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,6 +40,7 @@ import java.sql.SQLException; * @see JdbcTemplate#update(PreparedStatementCreator) * @see SqlProvider */ +@FunctionalInterface public interface PreparedStatementCreator { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementSetter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementSetter.java index 462eba3faf..8978a7f532 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementSetter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementSetter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,6 +40,7 @@ import java.sql.SQLException; * @see JdbcTemplate#update(String, PreparedStatementSetter) * @see JdbcTemplate#query(String, PreparedStatementSetter, ResultSetExtractor) */ +@FunctionalInterface public interface PreparedStatementSetter { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ResultSetExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ResultSetExtractor.java index 183b8b2b1b..7ada08f789 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ResultSetExtractor.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ResultSetExtractor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,6 +46,7 @@ import org.springframework.dao.DataAccessException; * @see RowMapper * @see org.springframework.jdbc.core.support.AbstractLobStreamingResultSetExtractor */ +@FunctionalInterface public interface ResultSetExtractor { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowCallbackHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowCallbackHandler.java index 47f1e4f57a..3f592052d2 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowCallbackHandler.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowCallbackHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,7 @@ import java.sql.SQLException; * @see ResultSetExtractor * @see RowCountCallbackHandler */ +@FunctionalInterface public interface RowCallbackHandler { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapper.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapper.java index 48ac7c8d3e..8e044a9290 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapper.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +45,7 @@ import java.sql.SQLException; * @see ResultSetExtractor * @see org.springframework.jdbc.object.MappingSqlQuery */ +@FunctionalInterface public interface RowMapper { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCallback.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCallback.java index 3edd3c2b67..7fdb710192 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCallback.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCallback.java @@ -33,6 +33,7 @@ import org.springframework.dao.DataAccessException; * @since 16.03.2004 * @see JdbcTemplate#execute(StatementCallback) */ +@FunctionalInterface public interface StatementCallback { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/DatabasePopulator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/DatabasePopulator.java index d72ee0cab3..fc03cb6b8b 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/DatabasePopulator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/DatabasePopulator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ import java.sql.SQLException; * @see DatabasePopulatorUtils * @see DataSourceInitializer */ +@FunctionalInterface public interface DatabasePopulator { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/DataSourceLookup.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/DataSourceLookup.java index f4eff425d3..1ab29a4337 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/DataSourceLookup.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/DataSourceLookup.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ import javax.sql.DataSource; * @since 2.0 * @see org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager#setDataSourceLookup */ +@FunctionalInterface public interface DataSourceLookup { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseMetaDataCallback.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseMetaDataCallback.java index abb9d7e33b..8b283c2633 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseMetaDataCallback.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseMetaDataCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ import java.sql.SQLException; * @author Thomas Risberg * @see JdbcUtils#extractDatabaseMetaData */ +@FunctionalInterface public interface DatabaseMetaDataCallback { /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionTranslator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionTranslator.java index 87a84c8dc1..193b1e1b1f 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionTranslator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,7 @@ import org.springframework.dao.DataAccessException; * @author Juergen Hoeller * @see org.springframework.dao.DataAccessException */ +@FunctionalInterface public interface SQLExceptionTranslator { /** diff --git a/spring-jms/src/main/java/org/springframework/jms/annotation/JmsListenerConfigurer.java b/spring-jms/src/main/java/org/springframework/jms/annotation/JmsListenerConfigurer.java index 403e5bd3f0..5427a3d1e8 100644 --- a/spring-jms/src/main/java/org/springframework/jms/annotation/JmsListenerConfigurer.java +++ b/spring-jms/src/main/java/org/springframework/jms/annotation/JmsListenerConfigurer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,7 @@ import org.springframework.jms.config.JmsListenerEndpointRegistrar; * @see EnableJms * @see JmsListenerEndpointRegistrar */ +@FunctionalInterface public interface JmsListenerConfigurer { /** diff --git a/spring-jms/src/main/java/org/springframework/jms/core/BrowserCallback.java b/spring-jms/src/main/java/org/springframework/jms/core/BrowserCallback.java index 563503eb07..c9f2b57790 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/BrowserCallback.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/BrowserCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,7 @@ import javax.jms.Session; * @see JmsTemplate#browse(BrowserCallback) * @see JmsTemplate#browseSelected(String, BrowserCallback) */ +@FunctionalInterface public interface BrowserCallback { /** diff --git a/spring-jms/src/main/java/org/springframework/jms/core/MessageCreator.java b/spring-jms/src/main/java/org/springframework/jms/core/MessageCreator.java index 3f3d5c14ba..213242d91d 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/MessageCreator.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/MessageCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ import javax.jms.Session; * @author Mark Pollack * @since 1.1 */ +@FunctionalInterface public interface MessageCreator { /** diff --git a/spring-jms/src/main/java/org/springframework/jms/core/ProducerCallback.java b/spring-jms/src/main/java/org/springframework/jms/core/ProducerCallback.java index 6297b67983..af787263c7 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/ProducerCallback.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/ProducerCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ import javax.jms.Session; * @see JmsTemplate#execute(javax.jms.Destination, ProducerCallback) * @see JmsTemplate#execute(String, ProducerCallback) */ +@FunctionalInterface public interface ProducerCallback { /** diff --git a/spring-jms/src/main/java/org/springframework/jms/core/SessionCallback.java b/spring-jms/src/main/java/org/springframework/jms/core/SessionCallback.java index 77c57614e2..e81728e5af 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/SessionCallback.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/SessionCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ import javax.jms.Session; * @since 1.1 * @see JmsTemplate#execute(SessionCallback) */ +@FunctionalInterface public interface SessionCallback { /** diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/SessionAwareMessageListener.java b/spring-jms/src/main/java/org/springframework/jms/listener/SessionAwareMessageListener.java index 15a39df922..c0946db259 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/SessionAwareMessageListener.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/SessionAwareMessageListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,7 @@ import javax.jms.Session; * @see org.springframework.jms.listener.endpoint.JmsMessageEndpointManager * @see javax.jms.MessageListener */ +@FunctionalInterface public interface SessionAwareMessageListener { /** diff --git a/spring-jms/src/main/java/org/springframework/jms/support/destination/DestinationResolver.java b/spring-jms/src/main/java/org/springframework/jms/support/destination/DestinationResolver.java index cd32ceae94..4a0d2cde4e 100644 --- a/spring-jms/src/main/java/org/springframework/jms/support/destination/DestinationResolver.java +++ b/spring-jms/src/main/java/org/springframework/jms/support/destination/DestinationResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,6 +38,7 @@ import javax.jms.Session; * @see org.springframework.jms.support.destination.DynamicDestinationResolver * @see org.springframework.jms.support.destination.JndiDestinationResolver */ +@FunctionalInterface public interface DestinationResolver { /** diff --git a/spring-messaging/src/main/java/org/springframework/messaging/MessageHandler.java b/spring-messaging/src/main/java/org/springframework/messaging/MessageHandler.java index d5ed9adbd3..ac2a3ebbb4 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/MessageHandler.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/MessageHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ package org.springframework.messaging; * @author Iwein Fuld * @since 4.0 */ +@FunctionalInterface public interface MessageHandler { /** diff --git a/spring-messaging/src/main/java/org/springframework/messaging/converter/ContentTypeResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/converter/ContentTypeResolver.java index f9fe42fe6e..afd7b7002c 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/converter/ContentTypeResolver.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/converter/ContentTypeResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import org.springframework.util.MimeType; * @author Rossen Stoyanchev * @since 4.0 */ +@FunctionalInterface public interface ContentTypeResolver { /** diff --git a/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolver.java index 2521c05f6c..bd50b234cf 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolver.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ package org.springframework.messaging.core; * @author Mark Fisher * @since 4.0 */ +@FunctionalInterface public interface DestinationResolver { /** diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/user/SimpSubscriptionMatcher.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/SimpSubscriptionMatcher.java index 97261db047..8f1fc3d848 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/user/SimpSubscriptionMatcher.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/SimpSubscriptionMatcher.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ package org.springframework.messaging.simp.user; * @author Rossen Stoyanchev * @since 4.2 */ +@FunctionalInterface public interface SimpSubscriptionMatcher { /** diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationResolver.java index 2354c05f31..722067611a 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationResolver.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,6 +34,7 @@ import org.springframework.messaging.Message; * @see org.springframework.messaging.simp.user.DefaultUserDestinationResolver * @see UserDestinationMessageHandler */ +@FunctionalInterface public interface UserDestinationResolver { /** diff --git a/spring-messaging/src/main/java/org/springframework/messaging/tcp/ReconnectStrategy.java b/spring-messaging/src/main/java/org/springframework/messaging/tcp/ReconnectStrategy.java index daa2394306..54f2f69661 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/tcp/ReconnectStrategy.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/tcp/ReconnectStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ package org.springframework.messaging.tcp; * @author Rossen Stoyanchev * @since 4.0 */ +@FunctionalInterface public interface ReconnectStrategy { /** diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateCallback.java b/spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateCallback.java index 54cee88152..d9a836db6d 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateCallback.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateCallback.java @@ -30,6 +30,7 @@ import org.hibernate.Session; * @see HibernateTemplate * @see HibernateTransactionManager */ +@FunctionalInterface public interface HibernateCallback { /** diff --git a/spring-test/src/main/java/org/springframework/test/context/ActiveProfilesResolver.java b/spring-test/src/main/java/org/springframework/test/context/ActiveProfilesResolver.java index dfefe7d3cb..bb8efd78f8 100644 --- a/spring-test/src/main/java/org/springframework/test/context/ActiveProfilesResolver.java +++ b/spring-test/src/main/java/org/springframework/test/context/ActiveProfilesResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,7 @@ package org.springframework.test.context; * @since 4.0 * @see ActiveProfiles */ +@FunctionalInterface public interface ActiveProfilesResolver { /** diff --git a/spring-test/src/main/java/org/springframework/test/web/client/RequestMatcher.java b/spring-test/src/main/java/org/springframework/test/web/client/RequestMatcher.java index 14237729aa..84d53039c0 100644 --- a/spring-test/src/main/java/org/springframework/test/web/client/RequestMatcher.java +++ b/spring-test/src/main/java/org/springframework/test/web/client/RequestMatcher.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ import org.springframework.http.client.ClientHttpRequest; * @author Craig Walls * @since 3.2 */ +@FunctionalInterface public interface RequestMatcher { /** diff --git a/spring-test/src/main/java/org/springframework/test/web/client/ResponseCreator.java b/spring-test/src/main/java/org/springframework/test/web/client/ResponseCreator.java index d7703bc95a..4b6098a4bc 100644 --- a/spring-test/src/main/java/org/springframework/test/web/client/ResponseCreator.java +++ b/spring-test/src/main/java/org/springframework/test/web/client/ResponseCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ import org.springframework.test.web.client.response.MockRestResponseCreators; * @author Craig Walls * @since 3.2 */ +@FunctionalInterface public interface ResponseCreator { /** diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/ResultHandler.java b/spring-test/src/main/java/org/springframework/test/web/servlet/ResultHandler.java index ea21c16c4b..cdb6806b80 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/ResultHandler.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/ResultHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,6 +44,7 @@ package org.springframework.test.web.servlet; * @author Sam Brannen * @since 3.2 */ +@FunctionalInterface public interface ResultHandler { /** diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/ResultMatcher.java b/spring-test/src/main/java/org/springframework/test/web/servlet/ResultMatcher.java index f781ba19c0..332019fb82 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/ResultMatcher.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/ResultMatcher.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,6 +46,7 @@ package org.springframework.test.web.servlet; * @author Sam Brannen * @since 3.2 */ +@FunctionalInterface public interface ResultMatcher { /** diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/WebRequestMatcher.java b/spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/WebRequestMatcher.java index 9f34a449de..5b122ab902 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/WebRequestMatcher.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/WebRequestMatcher.java @@ -26,6 +26,7 @@ import com.gargoylesoftware.htmlunit.WebRequest; * @see org.springframework.test.web.servlet.htmlunit.HostRequestMatcher * @see org.springframework.test.web.servlet.htmlunit.UrlRegexRequestMatcher */ +@FunctionalInterface public interface WebRequestMatcher { /** diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/request/RequestPostProcessor.java b/spring-test/src/main/java/org/springframework/test/web/servlet/request/RequestPostProcessor.java index f531fc07f4..4dacd88254 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/request/RequestPostProcessor.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/request/RequestPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,7 @@ import org.springframework.mock.web.MockHttpServletRequest; * @author Rob Winch * @since 3.2 */ +@FunctionalInterface public interface RequestPostProcessor { /** diff --git a/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslator.java b/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslator.java index 128b2b15cc..e8351de230 100644 --- a/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslator.java +++ b/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslator.java @@ -30,6 +30,7 @@ import org.springframework.dao.DataAccessException; * @author Juergen Hoeller * @since 2.0 */ +@FunctionalInterface public interface PersistenceExceptionTranslator { /** diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java index 3be2710f15..3729b682e1 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java @@ -40,6 +40,7 @@ import org.springframework.dao.DataAccessException; * @see CciTemplate#execute(javax.resource.cci.InteractionSpec, javax.resource.cci.Record) * @see CciTemplate#execute(javax.resource.cci.InteractionSpec, RecordCreator, RecordExtractor) */ +@FunctionalInterface public interface ConnectionCallback { /** diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java index 38db29348d..d480ca7115 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java @@ -41,6 +41,7 @@ import org.springframework.dao.DataAccessException; * @see CciTemplate#execute(javax.resource.cci.InteractionSpec, javax.resource.cci.Record) * @see CciTemplate#execute(javax.resource.cci.InteractionSpec, RecordCreator, RecordExtractor) */ +@FunctionalInterface public interface InteractionCallback { /** diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordCreator.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordCreator.java index f19f6ac2c3..ce0b57f938 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordCreator.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +45,7 @@ import org.springframework.dao.DataAccessException; * @see CciTemplate#createMappedRecord(String) * @see CciTemplate#setOutputRecordCreator(RecordCreator) */ +@FunctionalInterface public interface RecordCreator { /** diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java index 277d8a3cd1..058689707d 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,7 @@ import org.springframework.dao.DataAccessException; * @see CciTemplate#execute(javax.resource.cci.InteractionSpec, RecordCreator, RecordExtractor) * @see javax.resource.cci.ResultSet */ +@FunctionalInterface public interface RecordExtractor { /** diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java index 9eef0e03b2..7795d92210 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java @@ -630,6 +630,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init * Simple callback interface for proceeding with the target invocation. * Concrete interceptors/aspects adapt this to their invocation mechanism. */ + @FunctionalInterface protected interface InvocationCallback { Object proceedWithInvocation() throws Throwable; diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallback.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallback.java index 80e8bde72a..8e298d0081 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallback.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallback.java @@ -32,6 +32,7 @@ import org.springframework.transaction.TransactionStatus; * @see TransactionTemplate * @see CallbackPreferringPlatformTransactionManager */ +@FunctionalInterface public interface TransactionCallback { /** diff --git a/spring-web/src/main/java/org/springframework/http/StreamingHttpOutputMessage.java b/spring-web/src/main/java/org/springframework/http/StreamingHttpOutputMessage.java index 66facbb588..abe13051bf 100644 --- a/spring-web/src/main/java/org/springframework/http/StreamingHttpOutputMessage.java +++ b/spring-web/src/main/java/org/springframework/http/StreamingHttpOutputMessage.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,7 @@ public interface StreamingHttpOutputMessage extends HttpOutputMessage { * It is useful with HTTP client libraries that provide indirect access to an * {@link OutputStream} via a callback mechanism. */ + @FunctionalInterface interface Body { /** diff --git a/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequestExecution.java b/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequestExecution.java index df6e10c6f0..d356834122 100644 --- a/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequestExecution.java +++ b/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequestExecution.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ import org.springframework.http.HttpRequest; * @see ClientHttpRequestInterceptor * @since 3.1 */ +@FunctionalInterface public interface ClientHttpRequestExecution { /** diff --git a/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequestFactory.java b/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequestFactory.java index 4a2a502e1a..9ca49a8da4 100644 --- a/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequestFactory.java +++ b/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequestFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ import org.springframework.http.HttpMethod; * @author Arjen Poutsma * @since 3.0 */ +@FunctionalInterface public interface ClientHttpRequestFactory { /** diff --git a/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequestInterceptor.java b/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequestInterceptor.java index 410cdeb2ff..4788d879d8 100644 --- a/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequestInterceptor.java +++ b/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequestInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,7 @@ import org.springframework.http.HttpRequest; * @author Arjen Poutsma * @since 3.1 */ +@FunctionalInterface public interface ClientHttpRequestInterceptor { /** diff --git a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerRequestExecutor.java b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerRequestExecutor.java index 433edd8310..24afc47a54 100644 --- a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerRequestExecutor.java +++ b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerRequestExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,7 @@ import org.springframework.remoting.support.RemoteInvocationResult; * @since 1.1 * @see HttpInvokerClientInterceptor#setHttpInvokerRequestExecutor */ +@FunctionalInterface public interface HttpInvokerRequestExecutor { /** diff --git a/spring-web/src/main/java/org/springframework/web/HttpRequestHandler.java b/spring-web/src/main/java/org/springframework/web/HttpRequestHandler.java index 2e259e9386..ac173879a6 100644 --- a/spring-web/src/main/java/org/springframework/web/HttpRequestHandler.java +++ b/spring-web/src/main/java/org/springframework/web/HttpRequestHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,6 +74,7 @@ import javax.servlet.http.HttpServletResponse; * @see org.springframework.remoting.caucho.HessianServiceExporter * @see org.springframework.remoting.caucho.BurlapServiceExporter */ +@FunctionalInterface public interface HttpRequestHandler { /** diff --git a/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationStrategy.java b/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationStrategy.java index 586485a72a..6f998e73c4 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationStrategy.java +++ b/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationStrategy.java @@ -28,6 +28,7 @@ import org.springframework.web.context.request.NativeWebRequest; * @author Rossen Stoyanchev * @since 3.2 */ +@FunctionalInterface public interface ContentNegotiationStrategy { /** diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/WebArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/bind/support/WebArgumentResolver.java index 4fcc9c2e0b..5887d32c41 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/support/WebArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/bind/support/WebArgumentResolver.java @@ -41,6 +41,7 @@ import org.springframework.web.context.request.NativeWebRequest; * @since 2.5.2 * @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#setCustomArgumentResolvers */ +@FunctionalInterface public interface WebArgumentResolver { /** diff --git a/spring-web/src/main/java/org/springframework/web/client/AsyncRequestCallback.java b/spring-web/src/main/java/org/springframework/web/client/AsyncRequestCallback.java index 4a9840ef59..5dae560cbe 100644 --- a/spring-web/src/main/java/org/springframework/web/client/AsyncRequestCallback.java +++ b/spring-web/src/main/java/org/springframework/web/client/AsyncRequestCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ import org.springframework.http.client.AsyncClientHttpRequest; * @see org.springframework.web.client.AsyncRestTemplate#execute * @since 4.0 */ +@FunctionalInterface public interface AsyncRequestCallback { /** diff --git a/spring-web/src/main/java/org/springframework/web/client/RequestCallback.java b/spring-web/src/main/java/org/springframework/web/client/RequestCallback.java index a6474a7309..9c4f3dff2d 100644 --- a/spring-web/src/main/java/org/springframework/web/client/RequestCallback.java +++ b/spring-web/src/main/java/org/springframework/web/client/RequestCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ import org.springframework.http.client.ClientHttpRequest; * @see RestTemplate#execute * @since 3.0 */ +@FunctionalInterface public interface RequestCallback { /** diff --git a/spring-web/src/main/java/org/springframework/web/client/ResponseExtractor.java b/spring-web/src/main/java/org/springframework/web/client/ResponseExtractor.java index 2a0d9f6e45..143fb6925f 100644 --- a/spring-web/src/main/java/org/springframework/web/client/ResponseExtractor.java +++ b/spring-web/src/main/java/org/springframework/web/client/ResponseExtractor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,7 @@ import org.springframework.http.client.ClientHttpResponse; * @since 3.0 * @see RestTemplate#execute */ +@FunctionalInterface public interface ResponseExtractor { /** diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java b/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java index 5ce9871491..dc72b00cb3 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -243,6 +243,7 @@ public class DeferredResult { /** * Handles a DeferredResult value when set. */ + @FunctionalInterface public interface DeferredResultHandler { void handleResult(Object result); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMethodMappingNamingStrategy.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMethodMappingNamingStrategy.java index f764b182b5..fb38cd5f27 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMethodMappingNamingStrategy.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMethodMappingNamingStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,6 +37,7 @@ import org.springframework.web.method.HandlerMethod; * @author Rossen Stoyanchev * @since 4.1 */ +@FunctionalInterface public interface HandlerMethodMappingNamingStrategy { /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/Controller.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/Controller.java index 702ab7ccd9..f4f6bc88d7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/Controller.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/Controller.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -106,6 +106,7 @@ import org.springframework.web.servlet.ModelAndView; * @see org.springframework.web.context.ServletContextAware * @see org.springframework.web.context.support.WebApplicationObjectSupport */ +@FunctionalInterface public interface Controller { /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyEmitterAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyEmitterAdapter.java index fc827cc20a..da1e91ca0d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyEmitterAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyEmitterAdapter.java @@ -24,6 +24,7 @@ import org.springframework.http.server.ServerHttpResponse; * @author Rossen Stoyanchev * @since 4.3 */ +@FunctionalInterface public interface ResponseBodyEmitterAdapter { /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/StreamingResponseBody.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/StreamingResponseBody.java index a3a4240c20..a75a135a30 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/StreamingResponseBody.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/StreamingResponseBody.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ import java.io.OutputStream; * @author Rossen Stoyanchev * @since 4.2 */ +@FunctionalInterface public interface StreamingResponseBody { /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java index aa07717842..7e0e059164 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java @@ -143,7 +143,8 @@ public class AppCacheManifestTransformer extends ResourceTransformerSupport { } - private static interface SectionTransformer { + @FunctionalInterface + private interface SectionTransformer { /** * Transforms a line in a section of the manifest. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CssLinkResourceTransformer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CssLinkResourceTransformer.java index b0fc201c19..e335c76e68 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CssLinkResourceTransformer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CssLinkResourceTransformer.java @@ -128,7 +128,8 @@ public class CssLinkResourceTransformer extends ResourceTransformerSupport { } - protected static interface CssLinkParser { + @FunctionalInterface + protected interface CssLinkParser { void parseLink(String content, Set linkInfos); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformer.java index fe941d830b..a9e2a7346b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ import org.springframework.core.io.Resource; * @author Rossen Stoyanchev * @since 4.1 */ +@FunctionalInterface public interface ResourceTransformer { /**