Commit 31b0e817 authored by Andy Wilkinson's avatar Andy Wilkinson

Add @FunctionalInterface to remaining public and protected interfaces

See gh-6857
parent 3d52c86a
...@@ -168,6 +168,7 @@ public class HeapdumpMvcEndpoint extends AbstractNamedMvcEndpoint { ...@@ -168,6 +168,7 @@ public class HeapdumpMvcEndpoint extends AbstractNamedMvcEndpoint {
/** /**
* Strategy interface used to dump the heap to a file. * Strategy interface used to dump the heap to a file.
*/ */
@FunctionalInterface
protected interface HeapDumper { protected interface HeapDumper {
/** /**
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -76,7 +76,7 @@ abstract class NamePatternFilter<T> { ...@@ -76,7 +76,7 @@ abstract class NamePatternFilter<T> {
/** /**
* Callback used to add a name. * Callback used to add a name.
*/ */
protected interface NameCallback { interface NameCallback {
void addName(String name); void addName(String name);
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -26,6 +26,7 @@ import com.codahale.metrics.Reservoir; ...@@ -26,6 +26,7 @@ import com.codahale.metrics.Reservoir;
* @author Phillip Webb * @author Phillip Webb
* @since 1.5.0 * @since 1.5.0
*/ */
@FunctionalInterface
public interface ReservoirFactory { public interface ReservoirFactory {
/** /**
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -102,6 +102,7 @@ public class SimpleInMemoryRepository<T> { ...@@ -102,6 +102,7 @@ public class SimpleInMemoryRepository<T> {
* *
* @param <T> the value type * @param <T> the value type
*/ */
@FunctionalInterface
public interface Callback<T> { public interface Callback<T> {
/** /**
......
...@@ -39,6 +39,7 @@ import org.springframework.context.ResourceLoaderAware; ...@@ -39,6 +39,7 @@ import org.springframework.context.ResourceLoaderAware;
* @author Phillip Webb * @author Phillip Webb
* @since 1.5.0 * @since 1.5.0
*/ */
@FunctionalInterface
public interface AutoConfigurationImportFilter { public interface AutoConfigurationImportFilter {
/** /**
......
...@@ -41,6 +41,7 @@ import org.springframework.context.ResourceLoaderAware; ...@@ -41,6 +41,7 @@ import org.springframework.context.ResourceLoaderAware;
* @author Phillip Webb * @author Phillip Webb
* @since 1.5.0 * @since 1.5.0
*/ */
@FunctionalInterface
public interface AutoConfigurationImportListener extends EventListener { public interface AutoConfigurationImportListener extends EventListener {
/** /**
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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; ...@@ -27,6 +27,7 @@ import com.datastax.driver.core.Cluster.Builder;
* @author Eddú Meléndez * @author Eddú Meléndez
* @since 1.5.0 * @since 1.5.0
*/ */
@FunctionalInterface
public interface ClusterBuilderCustomizer { public interface ClusterBuilderCustomizer {
/** /**
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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; ...@@ -27,6 +27,7 @@ import io.searchbox.client.config.HttpClientConfig.Builder;
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.5.0 * @since 1.5.0
*/ */
@FunctionalInterface
public interface HttpClientConfigBuilderCustomizer { public interface HttpClientConfigBuilderCustomizer {
/** /**
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 ...@@ -25,6 +25,7 @@ import org.springframework.security.config.annotation.web.builders.WebSecurity.I
* @author Madhura Bhave * @author Madhura Bhave
* @since 1.5.0 * @since 1.5.0
*/ */
@FunctionalInterface
public interface IgnoredRequestCustomizer { public interface IgnoredRequestCustomizer {
/** /**
......
...@@ -26,6 +26,7 @@ import org.springframework.security.oauth2.client.OAuth2RestTemplate; ...@@ -26,6 +26,7 @@ import org.springframework.security.oauth2.client.OAuth2RestTemplate;
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.4.0 * @since 1.4.0
*/ */
@FunctionalInterface
public interface UserInfoRestTemplateFactory { public interface UserInfoRestTemplateFactory {
/** /**
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -27,6 +27,7 @@ import org.springframework.transaction.PlatformTransactionManager; ...@@ -27,6 +27,7 @@ import org.springframework.transaction.PlatformTransactionManager;
* @author Phillip Webb * @author Phillip Webb
* @since 1.5.0 * @since 1.5.0
*/ */
@FunctionalInterface
public interface PlatformTransactionManagerCustomizer<T extends PlatformTransactionManager> { public interface PlatformTransactionManagerCustomizer<T extends PlatformTransactionManager> {
/** /**
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -29,6 +29,7 @@ import org.springframework.test.context.TestExecutionListener; ...@@ -29,6 +29,7 @@ import org.springframework.test.context.TestExecutionListener;
* @since 1.4.1 * @since 1.4.1
* @see SpringBootTest * @see SpringBootTest
*/ */
@FunctionalInterface
public interface DefaultTestExecutionListenersPostProcessor { public interface DefaultTestExecutionListenersPostProcessor {
/** /**
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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; ...@@ -22,7 +22,6 @@ package org.springframework.boot.configurationprocessor.fieldvalues.javac;
* @author Phillip Webb * @author Phillip Webb
* @since 1.2.0 * @since 1.2.0
*/ */
@FunctionalInterface
interface TreeVisitor { interface TreeVisitor {
void visitVariable(VariableTree variable) throws Exception; void visitVariable(VariableTree variable) throws Exception;
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -25,6 +25,7 @@ import java.io.IOException; ...@@ -25,6 +25,7 @@ import java.io.IOException;
* @author Phillip Webb * @author Phillip Webb
* @since 1.5.0 * @since 1.5.0
*/ */
@FunctionalInterface
public interface CustomLoaderLayout { public interface CustomLoaderLayout {
/** /**
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -24,6 +24,7 @@ import java.io.File; ...@@ -24,6 +24,7 @@ import java.io.File;
* @author Dave Syer * @author Dave Syer
* @author Phillip Webb * @author Phillip Webb
*/ */
@FunctionalInterface
public interface LayoutFactory { public interface LayoutFactory {
/** /**
......
...@@ -404,6 +404,7 @@ public class Repackager { ...@@ -404,6 +404,7 @@ public class Repackager {
* Callback interface used to present a warning when finding the main class takes too * Callback interface used to present a warning when finding the main class takes too
* long. * long.
*/ */
@FunctionalInterface
public interface MainClassTimeoutWarningListener { public interface MainClassTimeoutWarningListener {
/** /**
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -21,7 +21,6 @@ package org.springframework.boot.loader.jar; ...@@ -21,7 +21,6 @@ package org.springframework.boot.loader.jar;
* *
* @author Phillip Webb * @author Phillip Webb
*/ */
@FunctionalInterface
interface JarEntryFilter { interface JarEntryFilter {
/** /**
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -326,7 +326,7 @@ class BeanDefinitionLoader { ...@@ -326,7 +326,7 @@ class BeanDefinitionLoader {
/** /**
* Source for Bean definitions defined in Groovy. * Source for Bean definitions defined in Groovy.
*/ */
protected interface GroovyBeanDefinitionSource { interface GroovyBeanDefinitionSource {
Closure<?> getBeans(); Closure<?> getBeans();
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -22,7 +22,6 @@ package org.springframework.boot.bind; ...@@ -22,7 +22,6 @@ package org.springframework.boot.bind;
* @author Phillip Webb * @author Phillip Webb
* @since 1.2.0 * @since 1.2.0
*/ */
@FunctionalInterface
interface PropertyNamePatternsMatcher { interface PropertyNamePatternsMatcher {
PropertyNamePatternsMatcher ALL = new PropertyNamePatternsMatcher() { PropertyNamePatternsMatcher ALL = new PropertyNamePatternsMatcher() {
......
...@@ -114,6 +114,7 @@ public class ConfigurationWarningsApplicationContextInitializer ...@@ -114,6 +114,7 @@ public class ConfigurationWarningsApplicationContextInitializer
/** /**
* A single check that can be applied. * A single check that can be applied.
*/ */
@FunctionalInterface
protected interface Check { protected interface Check {
/** /**
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -220,6 +220,7 @@ public class EntityManagerFactoryBuilder { ...@@ -220,6 +220,7 @@ public class EntityManagerFactoryBuilder {
/** /**
* A callback for new entity manager factory beans created by a Builder. * A callback for new entity manager factory beans created by a Builder.
*/ */
@FunctionalInterface
public interface EntityManagerFactoryBeanCallback { public interface EntityManagerFactoryBeanCallback {
void execute(LocalContainerEntityManagerFactoryBean factory); void execute(LocalContainerEntityManagerFactoryBean factory);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment