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. * Strategy interface used to dump the heap to a file.
*/ */
@FunctionalInterface
protected interface HeapDumper { 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"); * 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> {
/** /**
* 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);

@ -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"); * 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;
* @author Phillip Webb * @author Phillip Webb
* @since 1.5.0 * @since 1.5.0
*/ */
@FunctionalInterface
public interface ReservoirFactory { 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"); * 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> {
* *
* @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;
* @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;
* @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 {
/** /**

@ -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"); * 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;
* @author Eddú Meléndez * @author Eddú Meléndez
* @since 1.5.0 * @since 1.5.0
*/ */
@FunctionalInterface
public interface ClusterBuilderCustomizer { 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"); * 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;
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.5.0 * @since 1.5.0
*/ */
@FunctionalInterface
public interface HttpClientConfigBuilderCustomizer { 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"); * 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
* @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;
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.4.0 * @since 1.4.0
*/ */
@FunctionalInterface
public interface UserInfoRestTemplateFactory { 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"); * 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;
* @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> {
/** /**

@ -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"); * 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;
* @since 1.4.1 * @since 1.4.1
* @see SpringBootTest * @see SpringBootTest
*/ */
@FunctionalInterface
public interface DefaultTestExecutionListenersPostProcessor { 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"); * 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;
* @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;

@ -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"); * 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;
* @author Phillip Webb * @author Phillip Webb
* @since 1.5.0 * @since 1.5.0
*/ */
@FunctionalInterface
public interface CustomLoaderLayout { 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"); * 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;
* @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 {
* 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 {
/** /**

@ -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"); * 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;
* *
* @author Phillip Webb * @author Phillip Webb
*/ */
@FunctionalInterface
interface JarEntryFilter { 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"); * 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 {
/** /**
* Source for Bean definitions defined in Groovy. * Source for Bean definitions defined in Groovy.
*/ */
protected interface GroovyBeanDefinitionSource { interface GroovyBeanDefinitionSource {
Closure<?> getBeans(); 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"); * 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;
* @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
/** /**
* A single check that can be applied. * A single check that can be applied.
*/ */
@FunctionalInterface
protected interface Check { 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"); * 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 {
/** /**
* 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);

Loading…
Cancel
Save