Add @FunctionalInterface on candidate interfaces

Issue: SPR-14432
This commit is contained in:
Stephane Nicoll
2016-07-06 14:32:13 +02:00
parent 912b63ad44
commit e4b0486c5a
110 changed files with 199 additions and 84 deletions

View File

@@ -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 {
/**

View File

@@ -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 {
/**

View File

@@ -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 {
/**

View File

@@ -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 {
/**

View File

@@ -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 {
/**

View File

@@ -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 {
/**

View File

@@ -28,6 +28,7 @@ import org.springframework.web.context.request.NativeWebRequest;
* @author Rossen Stoyanchev
* @since 3.2
*/
@FunctionalInterface
public interface ContentNegotiationStrategy {
/**

View File

@@ -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 {
/**

View File

@@ -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 {
/**

View File

@@ -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 {
/**

View File

@@ -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<T> {
/**

View File

@@ -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<T> {
/**
* Handles a DeferredResult value when set.
*/
@FunctionalInterface
public interface DeferredResultHandler {
void handleResult(Object result);