Add @FunctionalInterface to remaining public and protected interfaces

See gh-6857
pull/8129/head
Andy Wilkinson 8 years ago
parent 3d52c86a21
commit 31b0e81765

@ -168,6 +168,7 @@ public class HeapdumpMvcEndpoint extends AbstractNamedMvcEndpoint {
/**
* Strategy interface used to dump the heap to a file.
*/
@FunctionalInterface
protected interface HeapDumper {
/**

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.
@ -76,7 +76,7 @@ abstract class NamePatternFilter<T> {
/**
* Callback used to add a name.
*/
protected interface NameCallback {
interface NameCallback {
void addName(String name);

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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 com.codahale.metrics.Reservoir;
* @author Phillip Webb
* @since 1.5.0
*/
@FunctionalInterface
public interface ReservoirFactory {
/**

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.
@ -102,6 +102,7 @@ public class SimpleInMemoryRepository<T> {
*
* @param <T> the value type
*/
@FunctionalInterface
public interface Callback<T> {
/**

@ -39,6 +39,7 @@ import org.springframework.context.ResourceLoaderAware;
* @author Phillip Webb
* @since 1.5.0
*/
@FunctionalInterface
public interface AutoConfigurationImportFilter {
/**

@ -41,6 +41,7 @@ import org.springframework.context.ResourceLoaderAware;
* @author Phillip Webb
* @since 1.5.0
*/
@FunctionalInterface
public interface AutoConfigurationImportListener extends EventListener {
/**

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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 com.datastax.driver.core.Cluster.Builder;
* @author Eddú Meléndez
* @since 1.5.0
*/
@FunctionalInterface
public interface ClusterBuilderCustomizer {
/**

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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 io.searchbox.client.config.HttpClientConfig.Builder;
* @author Stephane Nicoll
* @since 1.5.0
*/
@FunctionalInterface
public interface HttpClientConfigBuilderCustomizer {
/**

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.security.config.annotation.web.builders.WebSecurity.I
* @author Madhura Bhave
* @since 1.5.0
*/
@FunctionalInterface
public interface IgnoredRequestCustomizer {
/**

@ -26,6 +26,7 @@ import org.springframework.security.oauth2.client.OAuth2RestTemplate;
* @author Stephane Nicoll
* @since 1.4.0
*/
@FunctionalInterface
public interface UserInfoRestTemplateFactory {
/**

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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 org.springframework.transaction.PlatformTransactionManager;
* @author Phillip Webb
* @since 1.5.0
*/
@FunctionalInterface
public interface PlatformTransactionManagerCustomizer<T extends PlatformTransactionManager> {
/**

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.context.TestExecutionListener;
* @since 1.4.1
* @see SpringBootTest
*/
@FunctionalInterface
public interface DefaultTestExecutionListenersPostProcessor {
/**

@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2017 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,7 +22,6 @@ package org.springframework.boot.configurationprocessor.fieldvalues.javac;
* @author Phillip Webb
* @since 1.2.0
*/
@FunctionalInterface
interface TreeVisitor {
void visitVariable(VariableTree variable) throws Exception;

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.io.IOException;
* @author Phillip Webb
* @since 1.5.0
*/
@FunctionalInterface
public interface CustomLoaderLayout {
/**

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.
@ -24,6 +24,7 @@ import java.io.File;
* @author Dave Syer
* @author Phillip Webb
*/
@FunctionalInterface
public interface LayoutFactory {
/**

@ -404,6 +404,7 @@ public class Repackager {
* Callback interface used to present a warning when finding the main class takes too
* long.
*/
@FunctionalInterface
public interface MainClassTimeoutWarningListener {
/**

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.
@ -21,7 +21,6 @@ package org.springframework.boot.loader.jar;
*
* @author Phillip Webb
*/
@FunctionalInterface
interface JarEntryFilter {
/**

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.
@ -326,7 +326,7 @@ class BeanDefinitionLoader {
/**
* Source for Bean definitions defined in Groovy.
*/
protected interface GroovyBeanDefinitionSource {
interface GroovyBeanDefinitionSource {
Closure<?> getBeans();

@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2017 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,7 +22,6 @@ package org.springframework.boot.bind;
* @author Phillip Webb
* @since 1.2.0
*/
@FunctionalInterface
interface PropertyNamePatternsMatcher {
PropertyNamePatternsMatcher ALL = new PropertyNamePatternsMatcher() {

@ -114,6 +114,7 @@ public class ConfigurationWarningsApplicationContextInitializer
/**
* A single check that can be applied.
*/
@FunctionalInterface
protected interface Check {
/**

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.
@ -220,6 +220,7 @@ public class EntityManagerFactoryBuilder {
/**
* A callback for new entity manager factory beans created by a Builder.
*/
@FunctionalInterface
public interface EntityManagerFactoryBeanCallback {
void execute(LocalContainerEntityManagerFactoryBean factory);

Loading…
Cancel
Save