Add @FunctionalInterface on candidate interfaces
Issue: SPR-14432
This commit is contained in:
@@ -146,6 +146,7 @@ public abstract class MethodIntrospector {
|
||||
* A callback interface for metadata lookup on a given method.
|
||||
* @param <T> the type of metadata returned
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface MetadataLookup<T> {
|
||||
|
||||
/**
|
||||
|
||||
@@ -203,6 +203,7 @@ public class OrderComparator implements Comparator<Object> {
|
||||
* Strategy interface to provide an order source for a given object.
|
||||
* @since 4.1
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface OrderSourceProvider {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 <S> the source type
|
||||
* @param <T> the target type
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface Converter<S, T> {
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,6 +27,7 @@ package org.springframework.core.io;
|
||||
* @since 4.3
|
||||
* @see DefaultResourceLoader#addProtocolResolver
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface ProtocolResolver {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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<T> {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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<T> {
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,6 +32,7 @@ package org.springframework.core.task;
|
||||
* @see TaskExecutor#execute(Runnable)
|
||||
* @see SimpleAsyncTaskExecutor#setTaskDecorator
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface TaskDecorator {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
/**
|
||||
|
||||
@@ -243,6 +243,7 @@ public class AutoPopulatingList<E> implements List<E>, Serializable {
|
||||
* Factory interface for creating elements for an index-based access
|
||||
* data structure such as a {@link java.util.List}.
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface ElementFactory<E> {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,6 +22,7 @@ package org.springframework.util.concurrent;
|
||||
* @author Sebastien Deleuze
|
||||
* @since 4.1
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface FailureCallback {
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,6 +22,7 @@ package org.springframework.util.concurrent;
|
||||
* @author Sebastien Deleuze
|
||||
* @since 4.1
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface SuccessCallback<T> {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user