Commit f69c994d authored by Andy Wilkinson's avatar Andy Wilkinson

Merge pull request #6857 from Eddú Meléndez

* gh-6857:
  Add @FunctionalInterface to remaining public and protected interfaces
  Annotate interfaces with @FunctionaInterface
parents 6d70c061 31b0e817
......@@ -27,6 +27,7 @@ import org.springframework.cache.CacheManager;
* @author Phillip Webb
* @since 1.3.0
*/
@FunctionalInterface
public interface CacheStatisticsProvider<C extends Cache> {
/**
......
......@@ -29,6 +29,7 @@ import org.springframework.boot.actuate.metrics.Metric;
* @author Dave Syer
* @see SystemPublicMetrics SystemPublicMetrics for an example implementation
*/
@FunctionalInterface
public interface PublicMetrics {
/**
......
......@@ -22,6 +22,7 @@ package org.springframework.boot.actuate.endpoint.mvc;
* @author Dave Syer
* @since 1.2.0
*/
@FunctionalInterface
public interface EndpointHandlerMappingCustomizer {
/**
......
......@@ -168,6 +168,7 @@ public class HeapdumpMvcEndpoint extends AbstractNamedMvcEndpoint {
/**
* Strategy interface used to dump the heap to a file.
*/
@FunctionalInterface
protected interface HeapDumper {
/**
......
......@@ -22,6 +22,7 @@ package org.springframework.boot.actuate.endpoint.mvc;
* @author Phillip Webb
* @since 1.3.0
*/
@FunctionalInterface
public interface ManagementServletContext {
/**
......
/*
* 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);
......
......@@ -34,6 +34,7 @@ import java.util.Map;
* @author Christian Dupuis
* @since 1.1.0
*/
@FunctionalInterface
public interface HealthAggregator {
/**
......
......@@ -22,6 +22,7 @@ package org.springframework.boot.actuate.health;
* @author Dave Syer
* @see ApplicationHealthIndicator
*/
@FunctionalInterface
public interface HealthIndicator {
/**
......
......@@ -22,6 +22,7 @@ package org.springframework.boot.actuate.info;
* @author Stephane Nicoll
* @since 1.4.0
*/
@FunctionalInterface
public interface InfoContributor {
/**
......
......@@ -27,6 +27,7 @@ package org.springframework.boot.actuate.metrics;
*
* @author Dave Syer
*/
@FunctionalInterface
public interface GaugeService {
/**
......
/*
* 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 {
/**
......
......@@ -27,6 +27,7 @@ package org.springframework.boot.actuate.metrics.export;
* @author Dave Syer
* @since 1.3.0
*/
@FunctionalInterface
public interface Exporter {
/**
......
......@@ -22,6 +22,7 @@ package org.springframework.boot.actuate.metrics.opentsdb;
* @author Dave Syer
* @since 1.3.0
*/
@FunctionalInterface
public interface OpenTsdbNamingStrategy {
/**
......
......@@ -23,6 +23,7 @@ import org.springframework.boot.actuate.metrics.Metric;
*
* @author Dave Syer
*/
@FunctionalInterface
public interface PrefixMetricReader {
/**
......
/*
* 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> {
/**
......
......@@ -24,6 +24,7 @@ import org.springframework.boot.actuate.metrics.Metric;
* @author Dave Syer
* @since 1.3.0
*/
@FunctionalInterface
public interface GaugeWriter {
/**
......
......@@ -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 {
/**
......
......@@ -26,6 +26,7 @@ import org.springframework.cache.CacheManager;
* @author Stephane Nicoll
* @since 1.3.3
*/
@FunctionalInterface
public interface CacheManagerCustomizer<T extends CacheManager> {
/**
......
......@@ -25,6 +25,7 @@ import javax.cache.CacheManager;
* @author Stephane Nicoll
* @since 1.3.0
*/
@FunctionalInterface
public interface JCacheManagerCustomizer {
/**
......
/*
* 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 {
/**
......
/*
* 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 {
/**
......
......@@ -25,6 +25,7 @@ import org.flywaydb.core.Flyway;
* @author Andreas Ahlenstorf
* @author Phillip Webb
*/
@FunctionalInterface
public interface FlywayMigrationStrategy {
/**
......
......@@ -28,6 +28,7 @@ import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
* @author Grzegorz Poznachowski
* @since 1.4.0
*/
@FunctionalInterface
public interface Jackson2ObjectMapperBuilderCustomizer {
/**
......
......@@ -24,6 +24,7 @@ import javax.sql.DataSource;
* @author Stephane Nicoll
* @since 1.2.0
*/
@FunctionalInterface
public interface DataSourcePoolMetadataProvider {
/**
......
......@@ -25,6 +25,7 @@ import org.glassfish.jersey.server.ResourceConfig;
* @author Eddú Meléndez
* @since 1.4.0
*/
@FunctionalInterface
public interface ResourceConfigCustomizer {
/**
......
......@@ -29,6 +29,7 @@ import org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS;
* @since 1.3.0
* @see ArtemisAutoConfiguration
*/
@FunctionalInterface
public interface ArtemisConfigurationCustomizer {
/**
......
/*
* 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 {
/**
......
......@@ -28,6 +28,7 @@ import org.springframework.security.core.GrantedAuthority;
* @author Dave Syer
* @since 1.3.0
*/
@FunctionalInterface
public interface AuthoritiesExtractor {
/**
......
......@@ -25,6 +25,7 @@ import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenCo
* @author Dave Syer
* @since 1.3.0
*/
@FunctionalInterface
public interface JwtAccessTokenConverterConfigurer {
/**
......
......@@ -25,6 +25,7 @@ import java.util.Map;
* @author Phillip Webb
* @since 1.4.0
*/
@FunctionalInterface
public interface PrincipalExtractor {
/**
......
......@@ -29,6 +29,7 @@ import org.springframework.security.oauth2.client.OAuth2RestTemplate;
* @author Dave Syer
* @since 1.3.0
*/
@FunctionalInterface
public interface UserInfoRestTemplateCustomizer {
/**
......
......@@ -26,6 +26,7 @@ import org.springframework.security.oauth2.client.OAuth2RestTemplate;
* @author Stephane Nicoll
* @since 1.4.0
*/
@FunctionalInterface
public interface UserInfoRestTemplateFactory {
/**
......
......@@ -26,6 +26,7 @@ import org.springframework.core.io.ResourceLoader;
* @author Andy Wilkinson
* @since 1.1.0
*/
@FunctionalInterface
public interface TemplateAvailabilityProvider {
/**
......
/*
* 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> {
/**
......
......@@ -24,6 +24,7 @@ import org.springframework.stereotype.Controller;
*
* @author Phillip Webb
*/
@FunctionalInterface
public interface ErrorController {
/**
......
......@@ -29,6 +29,7 @@ import org.springframework.web.servlet.ModelAndView;
* @author Phillip Webb
* @since 1.4.0
*/
@FunctionalInterface
public interface ErrorViewResolver {
/**
......
......@@ -25,6 +25,7 @@ import java.util.ServiceLoader;
*
* @author Dave Syer
*/
@FunctionalInterface
public interface CommandFactory {
/**
......
......@@ -26,6 +26,7 @@ import java.util.List;
* @author Andy Wilkinson
* @since 1.2.0
*/
@FunctionalInterface
interface DependencyResolver {
/**
......
......@@ -24,6 +24,7 @@ import org.codehaus.groovy.transform.ASTTransformation;
*
* @author Dave Syer
*/
@FunctionalInterface
public interface SpringBootAstTransformation extends ASTTransformation {
}
......@@ -21,6 +21,7 @@ package org.springframework.boot.cli.compiler.grape;
*
* @author Andy Wilkinson
*/
@FunctionalInterface
interface ProgressReporter {
/**
......
......@@ -25,6 +25,7 @@ import org.eclipse.aether.RepositorySystem;
*
* @author Andy Wilkinson
*/
@FunctionalInterface
public interface RepositorySystemSessionAutoConfiguration {
/**
......
......@@ -27,6 +27,7 @@ import org.springframework.boot.devtools.filewatch.ChangedFile;
* @since 1.3.0
* @see PatternClassPathRestartStrategy
*/
@FunctionalInterface
public interface ClassPathRestartStrategy {
/**
......
......@@ -25,6 +25,7 @@ import java.util.Set;
* @author Phillip Webb
* @since 1.3.0
*/
@FunctionalInterface
public interface FileChangeListener {
/**
......
......@@ -22,6 +22,7 @@ package org.springframework.boot.devtools.filewatch;
* @author Phillip Webb
* @since 1.3.0
*/
@FunctionalInterface
public interface FileSystemWatcherFactory {
/**
......
......@@ -24,6 +24,7 @@ import org.springframework.http.server.ServerHttpRequest;
* @author Phillip Webb
* @since 1.3.0
*/
@FunctionalInterface
public interface AccessManager {
/**
......
......@@ -27,6 +27,7 @@ import org.springframework.http.server.ServerHttpResponse;
* @author Phillip Webb
* @since 1.3.0
*/
@FunctionalInterface
public interface Handler {
/**
......
......@@ -25,6 +25,7 @@ import org.springframework.http.server.ServerHttpRequest;
* @author Phillip Webb
* @since 1.3.0
*/
@FunctionalInterface
public interface HandlerMapper {
/**
......
......@@ -22,6 +22,7 @@ package org.springframework.boot.devtools.restart;
* @author Phillip Webb
* @since 1.3.0
*/
@FunctionalInterface
public interface FailureHandler {
/**
......
......@@ -25,6 +25,7 @@ import java.net.URL;
* @since 1.3.0
* @see DefaultRestartInitializer
*/
@FunctionalInterface
public interface RestartInitializer {
/**
......
......@@ -22,6 +22,7 @@ package org.springframework.boot.devtools.restart;
* @author Andy Wilkinson
* @since 1.3.0
*/
@FunctionalInterface
public interface RestartListener {
/**
......
......@@ -25,6 +25,7 @@ package org.springframework.boot.devtools.restart.classloader;
* @since 1.3.0
* @see ClassLoaderFile
*/
@FunctionalInterface
public interface ClassLoaderFileRepository {
/**
......
......@@ -26,6 +26,7 @@ import java.net.URL;
* @since 1.3.0
* @see DefaultSourceFolderUrlFilter
*/
@FunctionalInterface
public interface SourceFolderUrlFilter {
/**
......
......@@ -25,6 +25,7 @@ import java.nio.channels.WritableByteChannel;
* @author Phillip Webb
* @since 1.3.0
*/
@FunctionalInterface
public interface TunnelConnection {
/**
......
......@@ -23,6 +23,7 @@ package org.springframework.boot.devtools.tunnel.server;
* @author Phillip Webb
* @since 1.3.0
*/
@FunctionalInterface
public interface PortProvider {
/**
......
......@@ -25,6 +25,7 @@ import java.nio.channels.ByteChannel;
* @author Phillip Webb
* @since 1.3.0
*/
@FunctionalInterface
public interface TargetServerConnection {
/**
......
......@@ -29,6 +29,7 @@ import org.springframework.restdocs.mockmvc.MockMvcRestDocumentationConfigurer;
* @author Andy Wilkinson
* @since 1.4.0
*/
@FunctionalInterface
public interface RestDocsMockMvcConfigurationCustomizer {
/**
......
......@@ -28,6 +28,7 @@ import org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder;
* @since 1.4.0
* @see MockMvcAutoConfiguration
*/
@FunctionalInterface
public interface MockMvcBuilderCustomizer {
/**
......
/*
* 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 {
/**
......
......@@ -30,6 +30,7 @@ import org.springframework.boot.configurationprocessor.fieldvalues.javac.JavaCom
* @since 1.1.2
* @see JavaCompilerFieldValuesParser
*/
@FunctionalInterface
public interface FieldValuesParser {
/**
......
/*
* 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.
......
......@@ -24,6 +24,7 @@ import org.gradle.api.Project;
*
* @author Phillip Webb
*/
@FunctionalInterface
public interface PluginFeatures {
/**
......
/*
* 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 {
/**
......
......@@ -22,6 +22,7 @@ package org.springframework.boot.loader.tools;
* @author Phillip Webb
* @since 1.3.0
*/
@FunctionalInterface
public interface LaunchScript {
/**
......
/*
* 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 {
/**
......
......@@ -23,6 +23,7 @@ import java.io.IOException;
*
* @author Phillip Webb
*/
@FunctionalInterface
public interface Libraries {
/**
......
......@@ -24,6 +24,7 @@ import java.io.IOException;
*
* @author Phillip Webb
*/
@FunctionalInterface
public interface LibraryCallback {
/**
......
......@@ -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 {
/**
......
/*
* 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.core.annotation.Order;
* @since 1.3.0
* @see CommandLineRunner
*/
@FunctionalInterface
public interface ApplicationRunner {
/**
......
......@@ -28,6 +28,7 @@ import org.springframework.core.env.Environment;
* @author Jeremy Rickard
* @since 1.2.0
*/
@FunctionalInterface
public interface Banner {
/**
......
/*
* 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();
......
......@@ -31,6 +31,7 @@ import org.springframework.core.annotation.Order;
* @author Dave Syer
* @see ApplicationRunner
*/
@FunctionalInterface
public interface CommandLineRunner {
/**
......
......@@ -23,6 +23,7 @@ package org.springframework.boot;
* @author Phillip Webb
* @since 1.3.2
*/
@FunctionalInterface
public interface ExitCodeExceptionMapper {
/**
......
......@@ -25,6 +25,7 @@ package org.springframework.boot;
* @see SpringApplication#exit(org.springframework.context.ApplicationContext,
* ExitCodeGenerator...)
*/
@FunctionalInterface
public interface ExitCodeGenerator {
/**
......
/*
* 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.
......
......@@ -114,6 +114,7 @@ public class ConfigurationWarningsApplicationContextInitializer
/**
* A single check that can be applied.
*/
@FunctionalInterface
protected interface Check {
/**
......
......@@ -32,6 +32,7 @@ import org.springframework.beans.factory.config.BeanPostProcessor;
* @author Dave Syer
* @see EmbeddedServletContainerCustomizerBeanPostProcessor
*/
@FunctionalInterface
public interface EmbeddedServletContainerCustomizer {
/**
......
......@@ -33,6 +33,7 @@ import org.springframework.boot.web.servlet.ServletContextInitializer;
* @see JettyEmbeddedServletContainerFactory
* @see TomcatEmbeddedServletContainerFactory
*/
@FunctionalInterface
public interface EmbeddedServletContainerFactory {
/**
......
......@@ -24,6 +24,7 @@ import org.eclipse.jetty.server.Server;
* @author Dave Syer
* @see JettyEmbeddedServletContainerFactory
*/
@FunctionalInterface
public interface JettyServerCustomizer {
/**
......
......@@ -24,6 +24,7 @@ import org.apache.catalina.connector.Connector;
* @author Dave Syer
* @see TomcatEmbeddedServletContainerFactory
*/
@FunctionalInterface
public interface TomcatConnectorCustomizer {
/**
......
......@@ -24,6 +24,7 @@ import org.apache.catalina.Context;
* @author Dave Syer
* @see TomcatEmbeddedServletContainerFactory
*/
@FunctionalInterface
public interface TomcatContextCustomizer {
/**
......
......@@ -25,6 +25,7 @@ import io.undertow.Undertow.Builder;
* @since 1.2.0
* @see UndertowEmbeddedServletContainerFactory
*/
@FunctionalInterface
public interface UndertowBuilderCustomizer {
/**
......
......@@ -25,6 +25,7 @@ import io.undertow.servlet.api.DeploymentInfo;
* @since 1.2.0
* @see UndertowEmbeddedServletContainerFactory
*/
@FunctionalInterface
public interface UndertowDeploymentInfoCustomizer {
/**
......
......@@ -22,6 +22,7 @@ package org.springframework.boot.diagnostics;
* @author Andy Wilkinson
* @since 1.4.0
*/
@FunctionalInterface
public interface FailureAnalysisReporter {
/**
......
......@@ -23,6 +23,7 @@ package org.springframework.boot.diagnostics;
* @author Andy Wilkinson
* @since 1.4.0
*/
@FunctionalInterface
public interface FailureAnalyzer {
/**
......
......@@ -37,6 +37,7 @@ import org.springframework.core.env.Environment;
* @author Stephane Nicoll
* @since 1.3.0
*/
@FunctionalInterface
public interface EnvironmentPostProcessor {
/**
......
......@@ -27,6 +27,7 @@ import javax.transaction.TransactionManager;
* @author Phillip Webb
* @since 1.2.0
*/
@FunctionalInterface
public interface XAConnectionFactoryWrapper {
/**
......
......@@ -27,6 +27,7 @@ import javax.transaction.TransactionManager;
* @author Phillip Webb
* @since 1.2.0
*/
@FunctionalInterface
public interface XADataSourceWrapper {
/**
......
/*
* 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);
......
......@@ -25,6 +25,7 @@ import org.springframework.web.client.RestTemplate;
* @since 1.4.0
* @see RestTemplateBuilder
*/
@FunctionalInterface
public interface RestTemplateCustomizer {
/**
......
......@@ -22,6 +22,7 @@ package org.springframework.boot.web.servlet;
* @author Phillip Webb
* @since 1.4.0
*/
@FunctionalInterface
public interface ErrorPageRegistrar {
/**
......
......@@ -22,6 +22,7 @@ package org.springframework.boot.web.servlet;
* @author Phillip Webb
* @since 1.4.0
*/
@FunctionalInterface
public interface ErrorPageRegistry {
/**
......
......@@ -38,6 +38,7 @@ import org.springframework.web.WebApplicationInitializer;
* @since 1.4.0
* @see WebApplicationInitializer
*/
@FunctionalInterface
public interface ServletContextInitializer {
/**
......
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