Browse Source

Add @FunctionalInterface to remaining public and protected interfaces

See gh-6857
pull/8129/head
Andy Wilkinson 9 years ago
parent
commit
31b0e81765
  1. 1
      spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/HeapdumpMvcEndpoint.java
  2. 4
      spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/NamePatternFilter.java
  3. 3
      spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/dropwizard/ReservoirFactory.java
  4. 3
      spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/util/SimpleInMemoryRepository.java
  5. 1
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportFilter.java
  6. 1
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportListener.java
  7. 3
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/ClusterBuilderCustomizer.java
  8. 3
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/jest/HttpClientConfigBuilderCustomizer.java
  9. 3
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/IgnoredRequestCustomizer.java
  10. 1
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/UserInfoRestTemplateFactory.java
  11. 3
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/PlatformTransactionManagerCustomizer.java
  12. 3
      spring-boot-test/src/main/java/org/springframework/boot/test/context/DefaultTestExecutionListenersPostProcessor.java
  13. 3
      spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/fieldvalues/javac/TreeVisitor.java
  14. 3
      spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/CustomLoaderLayout.java
  15. 3
      spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/LayoutFactory.java
  16. 1
      spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java
  17. 3
      spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarEntryFilter.java
  18. 4
      spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java
  19. 3
      spring-boot/src/main/java/org/springframework/boot/bind/PropertyNamePatternsMatcher.java
  20. 1
      spring-boot/src/main/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializer.java
  21. 3
      spring-boot/src/main/java/org/springframework/boot/orm/jpa/EntityManagerFactoryBuilder.java

1
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/HeapdumpMvcEndpoint.java

@ -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.
*/
@FunctionalInterface
protected interface HeapDumper {
/**

4
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/NamePatternFilter.java

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

3
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/dropwizard/ReservoirFactory.java

@ -1,5 +1,5 @@ @@ -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; @@ -26,6 +26,7 @@ import com.codahale.metrics.Reservoir;
* @author Phillip Webb
* @since 1.5.0
*/
@FunctionalInterface
public interface ReservoirFactory {
/**

3
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/util/SimpleInMemoryRepository.java

@ -1,5 +1,5 @@ @@ -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> { @@ -102,6 +102,7 @@ public class SimpleInMemoryRepository<T> {
*
* @param <T> the value type
*/
@FunctionalInterface
public interface Callback<T> {
/**

1
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportFilter.java

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

1
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportListener.java

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

3
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/ClusterBuilderCustomizer.java

@ -1,5 +1,5 @@ @@ -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; @@ -27,6 +27,7 @@ import com.datastax.driver.core.Cluster.Builder;
* @author Eddú Meléndez
* @since 1.5.0
*/
@FunctionalInterface
public interface ClusterBuilderCustomizer {
/**

3
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/jest/HttpClientConfigBuilderCustomizer.java

@ -1,5 +1,5 @@ @@ -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; @@ -27,6 +27,7 @@ import io.searchbox.client.config.HttpClientConfig.Builder;
* @author Stephane Nicoll
* @since 1.5.0
*/
@FunctionalInterface
public interface HttpClientConfigBuilderCustomizer {
/**

3
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/IgnoredRequestCustomizer.java

@ -1,5 +1,5 @@ @@ -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 @@ -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 {
/**

1
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/UserInfoRestTemplateFactory.java

@ -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
* @since 1.4.0
*/
@FunctionalInterface
public interface UserInfoRestTemplateFactory {
/**

3
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/PlatformTransactionManagerCustomizer.java

@ -1,5 +1,5 @@ @@ -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; @@ -27,6 +27,7 @@ import org.springframework.transaction.PlatformTransactionManager;
* @author Phillip Webb
* @since 1.5.0
*/
@FunctionalInterface
public interface PlatformTransactionManagerCustomizer<T extends PlatformTransactionManager> {
/**

3
spring-boot-test/src/main/java/org/springframework/boot/test/context/DefaultTestExecutionListenersPostProcessor.java

@ -1,5 +1,5 @@ @@ -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; @@ -29,6 +29,7 @@ import org.springframework.test.context.TestExecutionListener;
* @since 1.4.1
* @see SpringBootTest
*/
@FunctionalInterface
public interface DefaultTestExecutionListenersPostProcessor {
/**

3
spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/fieldvalues/javac/TreeVisitor.java

@ -1,5 +1,5 @@ @@ -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; @@ -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;

3
spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/CustomLoaderLayout.java

@ -1,5 +1,5 @@ @@ -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; @@ -25,6 +25,7 @@ import java.io.IOException;
* @author Phillip Webb
* @since 1.5.0
*/
@FunctionalInterface
public interface CustomLoaderLayout {
/**

3
spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/LayoutFactory.java

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

1
spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java

@ -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
* long.
*/
@FunctionalInterface
public interface MainClassTimeoutWarningListener {
/**

3
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarEntryFilter.java

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

4
spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java

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

3
spring-boot/src/main/java/org/springframework/boot/bind/PropertyNamePatternsMatcher.java

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

1
spring-boot/src/main/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializer.java

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

3
spring-boot/src/main/java/org/springframework/boot/orm/jpa/EntityManagerFactoryBuilder.java

@ -1,5 +1,5 @@ @@ -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 { @@ -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