Merge pull request #6857 from Eddú Meléndez

* gh-6857:
  Add @FunctionalInterface to remaining public and protected interfaces
  Annotate interfaces with @FunctionaInterface
This commit is contained in:
Andy Wilkinson 2017-01-27 16:41:44 +00:00
commit f69c994df5
94 changed files with 106 additions and 17 deletions

View File

@ -27,6 +27,7 @@ import org.springframework.cache.CacheManager;
* @author Phillip Webb * @author Phillip Webb
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface CacheStatisticsProvider<C extends Cache> { public interface CacheStatisticsProvider<C extends Cache> {
/** /**

View File

@ -29,6 +29,7 @@ import org.springframework.boot.actuate.metrics.Metric;
* @author Dave Syer * @author Dave Syer
* @see SystemPublicMetrics SystemPublicMetrics for an example implementation * @see SystemPublicMetrics SystemPublicMetrics for an example implementation
*/ */
@FunctionalInterface
public interface PublicMetrics { public interface PublicMetrics {
/** /**

View File

@ -22,6 +22,7 @@ package org.springframework.boot.actuate.endpoint.mvc;
* @author Dave Syer * @author Dave Syer
* @since 1.2.0 * @since 1.2.0
*/ */
@FunctionalInterface
public interface EndpointHandlerMappingCustomizer { public interface EndpointHandlerMappingCustomizer {
/** /**

View File

@ -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 {
/** /**

View File

@ -22,6 +22,7 @@ package org.springframework.boot.actuate.endpoint.mvc;
* @author Phillip Webb * @author Phillip Webb
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface ManagementServletContext { public interface ManagementServletContext {
/** /**

View File

@ -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);

View File

@ -34,6 +34,7 @@ import java.util.Map;
* @author Christian Dupuis * @author Christian Dupuis
* @since 1.1.0 * @since 1.1.0
*/ */
@FunctionalInterface
public interface HealthAggregator { public interface HealthAggregator {
/** /**

View File

@ -22,6 +22,7 @@ package org.springframework.boot.actuate.health;
* @author Dave Syer * @author Dave Syer
* @see ApplicationHealthIndicator * @see ApplicationHealthIndicator
*/ */
@FunctionalInterface
public interface HealthIndicator { public interface HealthIndicator {
/** /**

View File

@ -22,6 +22,7 @@ package org.springframework.boot.actuate.info;
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.4.0 * @since 1.4.0
*/ */
@FunctionalInterface
public interface InfoContributor { public interface InfoContributor {
/** /**

View File

@ -27,6 +27,7 @@ package org.springframework.boot.actuate.metrics;
* *
* @author Dave Syer * @author Dave Syer
*/ */
@FunctionalInterface
public interface GaugeService { public interface GaugeService {
/** /**

View File

@ -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 {
/** /**

View File

@ -27,6 +27,7 @@ package org.springframework.boot.actuate.metrics.export;
* @author Dave Syer * @author Dave Syer
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface Exporter { public interface Exporter {
/** /**

View File

@ -22,6 +22,7 @@ package org.springframework.boot.actuate.metrics.opentsdb;
* @author Dave Syer * @author Dave Syer
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface OpenTsdbNamingStrategy { public interface OpenTsdbNamingStrategy {
/** /**

View File

@ -23,6 +23,7 @@ import org.springframework.boot.actuate.metrics.Metric;
* *
* @author Dave Syer * @author Dave Syer
*/ */
@FunctionalInterface
public interface PrefixMetricReader { public interface PrefixMetricReader {
/** /**

View File

@ -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> {
/** /**

View File

@ -24,6 +24,7 @@ import org.springframework.boot.actuate.metrics.Metric;
* @author Dave Syer * @author Dave Syer
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface GaugeWriter { public interface GaugeWriter {
/** /**

View File

@ -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 {
/** /**

View File

@ -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 {
/** /**

View File

@ -26,6 +26,7 @@ import org.springframework.cache.CacheManager;
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.3.3 * @since 1.3.3
*/ */
@FunctionalInterface
public interface CacheManagerCustomizer<T extends CacheManager> { public interface CacheManagerCustomizer<T extends CacheManager> {
/** /**

View File

@ -25,6 +25,7 @@ import javax.cache.CacheManager;
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface JCacheManagerCustomizer { public interface JCacheManagerCustomizer {
/** /**

View File

@ -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 {
/** /**

View File

@ -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 {
/** /**

View File

@ -25,6 +25,7 @@ import org.flywaydb.core.Flyway;
* @author Andreas Ahlenstorf * @author Andreas Ahlenstorf
* @author Phillip Webb * @author Phillip Webb
*/ */
@FunctionalInterface
public interface FlywayMigrationStrategy { public interface FlywayMigrationStrategy {
/** /**

View File

@ -28,6 +28,7 @@ import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
* @author Grzegorz Poznachowski * @author Grzegorz Poznachowski
* @since 1.4.0 * @since 1.4.0
*/ */
@FunctionalInterface
public interface Jackson2ObjectMapperBuilderCustomizer { public interface Jackson2ObjectMapperBuilderCustomizer {
/** /**

View File

@ -24,6 +24,7 @@ import javax.sql.DataSource;
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.2.0 * @since 1.2.0
*/ */
@FunctionalInterface
public interface DataSourcePoolMetadataProvider { public interface DataSourcePoolMetadataProvider {
/** /**

View File

@ -25,6 +25,7 @@ import org.glassfish.jersey.server.ResourceConfig;
* @author Eddú Meléndez * @author Eddú Meléndez
* @since 1.4.0 * @since 1.4.0
*/ */
@FunctionalInterface
public interface ResourceConfigCustomizer { public interface ResourceConfigCustomizer {
/** /**

View File

@ -29,6 +29,7 @@ import org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS;
* @since 1.3.0 * @since 1.3.0
* @see ArtemisAutoConfiguration * @see ArtemisAutoConfiguration
*/ */
@FunctionalInterface
public interface ArtemisConfigurationCustomizer { public interface ArtemisConfigurationCustomizer {
/** /**

View File

@ -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 {
/** /**

View File

@ -28,6 +28,7 @@ import org.springframework.security.core.GrantedAuthority;
* @author Dave Syer * @author Dave Syer
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface AuthoritiesExtractor { public interface AuthoritiesExtractor {
/** /**

View File

@ -25,6 +25,7 @@ import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenCo
* @author Dave Syer * @author Dave Syer
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface JwtAccessTokenConverterConfigurer { public interface JwtAccessTokenConverterConfigurer {
/** /**

View File

@ -25,6 +25,7 @@ import java.util.Map;
* @author Phillip Webb * @author Phillip Webb
* @since 1.4.0 * @since 1.4.0
*/ */
@FunctionalInterface
public interface PrincipalExtractor { public interface PrincipalExtractor {
/** /**

View File

@ -29,6 +29,7 @@ import org.springframework.security.oauth2.client.OAuth2RestTemplate;
* @author Dave Syer * @author Dave Syer
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface UserInfoRestTemplateCustomizer { public interface UserInfoRestTemplateCustomizer {
/** /**

View File

@ -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 {
/** /**

View File

@ -26,6 +26,7 @@ import org.springframework.core.io.ResourceLoader;
* @author Andy Wilkinson * @author Andy Wilkinson
* @since 1.1.0 * @since 1.1.0
*/ */
@FunctionalInterface
public interface TemplateAvailabilityProvider { public interface TemplateAvailabilityProvider {
/** /**

View File

@ -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> {
/** /**

View File

@ -24,6 +24,7 @@ import org.springframework.stereotype.Controller;
* *
* @author Phillip Webb * @author Phillip Webb
*/ */
@FunctionalInterface
public interface ErrorController { public interface ErrorController {
/** /**

View File

@ -29,6 +29,7 @@ import org.springframework.web.servlet.ModelAndView;
* @author Phillip Webb * @author Phillip Webb
* @since 1.4.0 * @since 1.4.0
*/ */
@FunctionalInterface
public interface ErrorViewResolver { public interface ErrorViewResolver {
/** /**

View File

@ -25,6 +25,7 @@ import java.util.ServiceLoader;
* *
* @author Dave Syer * @author Dave Syer
*/ */
@FunctionalInterface
public interface CommandFactory { public interface CommandFactory {
/** /**

View File

@ -26,6 +26,7 @@ import java.util.List;
* @author Andy Wilkinson * @author Andy Wilkinson
* @since 1.2.0 * @since 1.2.0
*/ */
@FunctionalInterface
interface DependencyResolver { interface DependencyResolver {
/** /**

View File

@ -24,6 +24,7 @@ import org.codehaus.groovy.transform.ASTTransformation;
* *
* @author Dave Syer * @author Dave Syer
*/ */
@FunctionalInterface
public interface SpringBootAstTransformation extends ASTTransformation { public interface SpringBootAstTransformation extends ASTTransformation {
} }

View File

@ -21,6 +21,7 @@ package org.springframework.boot.cli.compiler.grape;
* *
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@FunctionalInterface
interface ProgressReporter { interface ProgressReporter {
/** /**

View File

@ -25,6 +25,7 @@ import org.eclipse.aether.RepositorySystem;
* *
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@FunctionalInterface
public interface RepositorySystemSessionAutoConfiguration { public interface RepositorySystemSessionAutoConfiguration {
/** /**

View File

@ -27,6 +27,7 @@ import org.springframework.boot.devtools.filewatch.ChangedFile;
* @since 1.3.0 * @since 1.3.0
* @see PatternClassPathRestartStrategy * @see PatternClassPathRestartStrategy
*/ */
@FunctionalInterface
public interface ClassPathRestartStrategy { public interface ClassPathRestartStrategy {
/** /**

View File

@ -25,6 +25,7 @@ import java.util.Set;
* @author Phillip Webb * @author Phillip Webb
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface FileChangeListener { public interface FileChangeListener {
/** /**

View File

@ -22,6 +22,7 @@ package org.springframework.boot.devtools.filewatch;
* @author Phillip Webb * @author Phillip Webb
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface FileSystemWatcherFactory { public interface FileSystemWatcherFactory {
/** /**

View File

@ -24,6 +24,7 @@ import org.springframework.http.server.ServerHttpRequest;
* @author Phillip Webb * @author Phillip Webb
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface AccessManager { public interface AccessManager {
/** /**

View File

@ -27,6 +27,7 @@ import org.springframework.http.server.ServerHttpResponse;
* @author Phillip Webb * @author Phillip Webb
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface Handler { public interface Handler {
/** /**

View File

@ -25,6 +25,7 @@ import org.springframework.http.server.ServerHttpRequest;
* @author Phillip Webb * @author Phillip Webb
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface HandlerMapper { public interface HandlerMapper {
/** /**

View File

@ -22,6 +22,7 @@ package org.springframework.boot.devtools.restart;
* @author Phillip Webb * @author Phillip Webb
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface FailureHandler { public interface FailureHandler {
/** /**

View File

@ -25,6 +25,7 @@ import java.net.URL;
* @since 1.3.0 * @since 1.3.0
* @see DefaultRestartInitializer * @see DefaultRestartInitializer
*/ */
@FunctionalInterface
public interface RestartInitializer { public interface RestartInitializer {
/** /**

View File

@ -22,6 +22,7 @@ package org.springframework.boot.devtools.restart;
* @author Andy Wilkinson * @author Andy Wilkinson
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface RestartListener { public interface RestartListener {
/** /**

View File

@ -25,6 +25,7 @@ package org.springframework.boot.devtools.restart.classloader;
* @since 1.3.0 * @since 1.3.0
* @see ClassLoaderFile * @see ClassLoaderFile
*/ */
@FunctionalInterface
public interface ClassLoaderFileRepository { public interface ClassLoaderFileRepository {
/** /**

View File

@ -26,6 +26,7 @@ import java.net.URL;
* @since 1.3.0 * @since 1.3.0
* @see DefaultSourceFolderUrlFilter * @see DefaultSourceFolderUrlFilter
*/ */
@FunctionalInterface
public interface SourceFolderUrlFilter { public interface SourceFolderUrlFilter {
/** /**

View File

@ -25,6 +25,7 @@ import java.nio.channels.WritableByteChannel;
* @author Phillip Webb * @author Phillip Webb
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface TunnelConnection { public interface TunnelConnection {
/** /**

View File

@ -23,6 +23,7 @@ package org.springframework.boot.devtools.tunnel.server;
* @author Phillip Webb * @author Phillip Webb
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface PortProvider { public interface PortProvider {
/** /**

View File

@ -25,6 +25,7 @@ import java.nio.channels.ByteChannel;
* @author Phillip Webb * @author Phillip Webb
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface TargetServerConnection { public interface TargetServerConnection {
/** /**

View File

@ -29,6 +29,7 @@ import org.springframework.restdocs.mockmvc.MockMvcRestDocumentationConfigurer;
* @author Andy Wilkinson * @author Andy Wilkinson
* @since 1.4.0 * @since 1.4.0
*/ */
@FunctionalInterface
public interface RestDocsMockMvcConfigurationCustomizer { public interface RestDocsMockMvcConfigurationCustomizer {
/** /**

View File

@ -28,6 +28,7 @@ import org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder;
* @since 1.4.0 * @since 1.4.0
* @see MockMvcAutoConfiguration * @see MockMvcAutoConfiguration
*/ */
@FunctionalInterface
public interface MockMvcBuilderCustomizer { public interface MockMvcBuilderCustomizer {
/** /**

View File

@ -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 {
/** /**

View File

@ -30,6 +30,7 @@ import org.springframework.boot.configurationprocessor.fieldvalues.javac.JavaCom
* @since 1.1.2 * @since 1.1.2
* @see JavaCompilerFieldValuesParser * @see JavaCompilerFieldValuesParser
*/ */
@FunctionalInterface
public interface FieldValuesParser { public interface FieldValuesParser {
/** /**

View File

@ -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.

View File

@ -24,6 +24,7 @@ import org.gradle.api.Project;
* *
* @author Phillip Webb * @author Phillip Webb
*/ */
@FunctionalInterface
public interface PluginFeatures { public interface PluginFeatures {
/** /**

View File

@ -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 {
/** /**

View File

@ -22,6 +22,7 @@ package org.springframework.boot.loader.tools;
* @author Phillip Webb * @author Phillip Webb
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface LaunchScript { public interface LaunchScript {
/** /**

View File

@ -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 {
/** /**

View File

@ -23,6 +23,7 @@ import java.io.IOException;
* *
* @author Phillip Webb * @author Phillip Webb
*/ */
@FunctionalInterface
public interface Libraries { public interface Libraries {
/** /**

View File

@ -24,6 +24,7 @@ import java.io.IOException;
* *
* @author Phillip Webb * @author Phillip Webb
*/ */
@FunctionalInterface
public interface LibraryCallback { public interface LibraryCallback {
/** /**

View File

@ -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 {
/** /**

View File

@ -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.

View File

@ -29,6 +29,7 @@ import org.springframework.core.annotation.Order;
* @since 1.3.0 * @since 1.3.0
* @see CommandLineRunner * @see CommandLineRunner
*/ */
@FunctionalInterface
public interface ApplicationRunner { public interface ApplicationRunner {
/** /**

View File

@ -28,6 +28,7 @@ import org.springframework.core.env.Environment;
* @author Jeremy Rickard * @author Jeremy Rickard
* @since 1.2.0 * @since 1.2.0
*/ */
@FunctionalInterface
public interface Banner { public interface Banner {
/** /**

View File

@ -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();

View File

@ -31,6 +31,7 @@ import org.springframework.core.annotation.Order;
* @author Dave Syer * @author Dave Syer
* @see ApplicationRunner * @see ApplicationRunner
*/ */
@FunctionalInterface
public interface CommandLineRunner { public interface CommandLineRunner {
/** /**

View File

@ -23,6 +23,7 @@ package org.springframework.boot;
* @author Phillip Webb * @author Phillip Webb
* @since 1.3.2 * @since 1.3.2
*/ */
@FunctionalInterface
public interface ExitCodeExceptionMapper { public interface ExitCodeExceptionMapper {
/** /**

View File

@ -25,6 +25,7 @@ package org.springframework.boot;
* @see SpringApplication#exit(org.springframework.context.ApplicationContext, * @see SpringApplication#exit(org.springframework.context.ApplicationContext,
* ExitCodeGenerator...) * ExitCodeGenerator...)
*/ */
@FunctionalInterface
public interface ExitCodeGenerator { public interface ExitCodeGenerator {
/** /**

View File

@ -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.

View File

@ -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 {
/** /**

View File

@ -32,6 +32,7 @@ import org.springframework.beans.factory.config.BeanPostProcessor;
* @author Dave Syer * @author Dave Syer
* @see EmbeddedServletContainerCustomizerBeanPostProcessor * @see EmbeddedServletContainerCustomizerBeanPostProcessor
*/ */
@FunctionalInterface
public interface EmbeddedServletContainerCustomizer { public interface EmbeddedServletContainerCustomizer {
/** /**

View File

@ -33,6 +33,7 @@ import org.springframework.boot.web.servlet.ServletContextInitializer;
* @see JettyEmbeddedServletContainerFactory * @see JettyEmbeddedServletContainerFactory
* @see TomcatEmbeddedServletContainerFactory * @see TomcatEmbeddedServletContainerFactory
*/ */
@FunctionalInterface
public interface EmbeddedServletContainerFactory { public interface EmbeddedServletContainerFactory {
/** /**

View File

@ -24,6 +24,7 @@ import org.eclipse.jetty.server.Server;
* @author Dave Syer * @author Dave Syer
* @see JettyEmbeddedServletContainerFactory * @see JettyEmbeddedServletContainerFactory
*/ */
@FunctionalInterface
public interface JettyServerCustomizer { public interface JettyServerCustomizer {
/** /**

View File

@ -24,6 +24,7 @@ import org.apache.catalina.connector.Connector;
* @author Dave Syer * @author Dave Syer
* @see TomcatEmbeddedServletContainerFactory * @see TomcatEmbeddedServletContainerFactory
*/ */
@FunctionalInterface
public interface TomcatConnectorCustomizer { public interface TomcatConnectorCustomizer {
/** /**

View File

@ -24,6 +24,7 @@ import org.apache.catalina.Context;
* @author Dave Syer * @author Dave Syer
* @see TomcatEmbeddedServletContainerFactory * @see TomcatEmbeddedServletContainerFactory
*/ */
@FunctionalInterface
public interface TomcatContextCustomizer { public interface TomcatContextCustomizer {
/** /**

View File

@ -25,6 +25,7 @@ import io.undertow.Undertow.Builder;
* @since 1.2.0 * @since 1.2.0
* @see UndertowEmbeddedServletContainerFactory * @see UndertowEmbeddedServletContainerFactory
*/ */
@FunctionalInterface
public interface UndertowBuilderCustomizer { public interface UndertowBuilderCustomizer {
/** /**

View File

@ -25,6 +25,7 @@ import io.undertow.servlet.api.DeploymentInfo;
* @since 1.2.0 * @since 1.2.0
* @see UndertowEmbeddedServletContainerFactory * @see UndertowEmbeddedServletContainerFactory
*/ */
@FunctionalInterface
public interface UndertowDeploymentInfoCustomizer { public interface UndertowDeploymentInfoCustomizer {
/** /**

View File

@ -22,6 +22,7 @@ package org.springframework.boot.diagnostics;
* @author Andy Wilkinson * @author Andy Wilkinson
* @since 1.4.0 * @since 1.4.0
*/ */
@FunctionalInterface
public interface FailureAnalysisReporter { public interface FailureAnalysisReporter {
/** /**

View File

@ -23,6 +23,7 @@ package org.springframework.boot.diagnostics;
* @author Andy Wilkinson * @author Andy Wilkinson
* @since 1.4.0 * @since 1.4.0
*/ */
@FunctionalInterface
public interface FailureAnalyzer { public interface FailureAnalyzer {
/** /**

View File

@ -37,6 +37,7 @@ import org.springframework.core.env.Environment;
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.3.0 * @since 1.3.0
*/ */
@FunctionalInterface
public interface EnvironmentPostProcessor { public interface EnvironmentPostProcessor {
/** /**

View File

@ -27,6 +27,7 @@ import javax.transaction.TransactionManager;
* @author Phillip Webb * @author Phillip Webb
* @since 1.2.0 * @since 1.2.0
*/ */
@FunctionalInterface
public interface XAConnectionFactoryWrapper { public interface XAConnectionFactoryWrapper {
/** /**

View File

@ -27,6 +27,7 @@ import javax.transaction.TransactionManager;
* @author Phillip Webb * @author Phillip Webb
* @since 1.2.0 * @since 1.2.0
*/ */
@FunctionalInterface
public interface XADataSourceWrapper { public interface XADataSourceWrapper {
/** /**

View File

@ -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);

View File

@ -25,6 +25,7 @@ import org.springframework.web.client.RestTemplate;
* @since 1.4.0 * @since 1.4.0
* @see RestTemplateBuilder * @see RestTemplateBuilder
*/ */
@FunctionalInterface
public interface RestTemplateCustomizer { public interface RestTemplateCustomizer {
/** /**

View File

@ -22,6 +22,7 @@ package org.springframework.boot.web.servlet;
* @author Phillip Webb * @author Phillip Webb
* @since 1.4.0 * @since 1.4.0
*/ */
@FunctionalInterface
public interface ErrorPageRegistrar { public interface ErrorPageRegistrar {
/** /**

View File

@ -22,6 +22,7 @@ package org.springframework.boot.web.servlet;
* @author Phillip Webb * @author Phillip Webb
* @since 1.4.0 * @since 1.4.0
*/ */
@FunctionalInterface
public interface ErrorPageRegistry { public interface ErrorPageRegistry {
/** /**

View File

@ -38,6 +38,7 @@ import org.springframework.web.WebApplicationInitializer;
* @since 1.4.0 * @since 1.4.0
* @see WebApplicationInitializer * @see WebApplicationInitializer
*/ */
@FunctionalInterface
public interface ServletContextInitializer { public interface ServletContextInitializer {
/** /**