Add @FunctionalInterface on candidate interfaces

Issue: SPR-14432
This commit is contained in:
Stephane Nicoll 2016-07-06 14:32:13 +02:00
parent 912b63ad44
commit e4b0486c5a
110 changed files with 199 additions and 84 deletions

View File

@ -39,6 +39,7 @@ package org.aopalliance.intercept;
*
* @author Rod Johnson
*/
@FunctionalInterface
public interface MethodInterceptor extends Interceptor {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2016 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 @@ package org.springframework.aop;
* @see Pointcut
* @see MethodMatcher
*/
@FunctionalInterface
public interface ClassFilter {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.aop.TargetSource;
* @author Rod Johnson
* @author Juergen Hoeller
*/
@FunctionalInterface
public interface TargetSourceCreator {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 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 java.lang.reflect.Method;
* @author Stephane Nicoll
* @since 4.1
*/
@FunctionalInterface
public interface AsyncUncaughtExceptionHandler {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -42,6 +42,7 @@ import org.springframework.beans.BeansException;
* @see BeanPostProcessor
* @see PropertyResourceConfigurer
*/
@FunctionalInterface
public interface BeanFactoryPostProcessor {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -33,6 +33,7 @@ import org.springframework.core.io.Resource;
* @see org.springframework.beans.BeanMetadataElement#getSource()
* @see org.springframework.beans.factory.config.BeanDefinition
*/
@FunctionalInterface
public interface SourceExtractor {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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 @@ package org.springframework.beans.factory.xml;
* @see NamespaceHandler
* @see org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader
*/
@FunctionalInterface
public interface NamespaceHandlerResolver {
/**

View File

@ -36,6 +36,7 @@ import javax.mail.internet.MimeMessage;
* @see JavaMailSender#send(MimeMessagePreparator[])
* @see MimeMessageHelper
*/
@FunctionalInterface
public interface MimeMessagePreparator {
/**

View File

@ -145,6 +145,7 @@ public interface Cache {
/**
* A (wrapper) object representing a cache value.
*/
@FunctionalInterface
interface ValueWrapper {
/**

View File

@ -181,6 +181,7 @@ public class AnnotationCacheOperationSource extends AbstractFallbackCacheOperati
* Callback interface providing {@link CacheOperation} instance(s) based on
* a given {@link CacheAnnotationParser}.
*/
@FunctionalInterface
protected interface CacheOperationProvider {
/**

View File

@ -27,6 +27,7 @@ package org.springframework.cache.interceptor;
* @author Stephane Nicoll
* @since 4.1
*/
@FunctionalInterface
public interface CacheOperationInvoker {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.
@ -28,6 +28,7 @@ import org.springframework.cache.Cache;
* @author Stephane Nicoll
* @since 4.1
*/
@FunctionalInterface
public interface CacheResolver {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2016 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 java.lang.reflect.Method;
* @author Phillip Webb
* @since 3.1
*/
@FunctionalInterface
public interface KeyGenerator {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.
@ -33,6 +33,7 @@ import java.util.EventListener;
* @param <E> the specific ApplicationEvent subclass to listen to
* @see org.springframework.context.event.ApplicationEventMulticaster
*/
@FunctionalInterface
public interface ApplicationListener<E extends ApplicationEvent> extends EventListener {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2016 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.
@ -38,6 +38,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
* @see Conditional
* @see ConditionContext
*/
@FunctionalInterface
public interface Condition {
/**

View File

@ -151,6 +151,7 @@ class ConfigurationClassEnhancer {
* must remain public in order to allow access to subclasses generated from other
* packages (i.e. user code).
*/
@FunctionalInterface
public interface EnhancedConfiguration extends BeanFactoryAware {
}
@ -159,6 +160,7 @@ class ConfigurationClassEnhancer {
* Conditional {@link Callback}.
* @see ConditionalCallbackFilter
*/
@FunctionalInterface
private interface ConditionalCallback extends Callback {
boolean isMatch(Method candidateMethod);

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.beans.factory.config.BeanDefinition;
* @since 2.5
* @see org.springframework.context.annotation.Scope
*/
@FunctionalInterface
public interface ScopeMetadataResolver {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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 java.util.Locale;
* @since 3.0
* @param <T> the type of object this Parser produces
*/
@FunctionalInterface
public interface Parser<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.util.Locale;
* @since 3.0
* @param <T> the type of object this Printer prints
*/
@FunctionalInterface
public interface Printer<T> {
/**

View File

@ -1077,7 +1077,8 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo
/**
* Internal callback interface for the autodetection process.
*/
private static interface AutodetectCallback {
@FunctionalInterface
private interface AutodetectCallback {
/**
* Called during the autodetection process to decide whether

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -30,6 +30,7 @@ import javax.management.ObjectName;
* @see org.springframework.jmx.export.MBeanExporter
* @see javax.management.ObjectName
*/
@FunctionalInterface
public interface ObjectNamingStrategy {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -42,6 +42,7 @@ import javax.management.Notification;
* @see NotificationPublisherAware
* @see org.springframework.jmx.export.MBeanExporter
*/
@FunctionalInterface
public interface NotificationPublisher {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -33,6 +33,7 @@ import javax.naming.NamingException;
* @see JndiTemplate
* @see org.springframework.jdbc.core.JdbcTemplate
*/
@FunctionalInterface
public interface JndiCallback<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -36,6 +36,7 @@ import org.springframework.scheduling.config.ScheduledTaskRegistrar;
* @see EnableScheduling
* @see ScheduledTaskRegistrar
*/
@FunctionalInterface
public interface SchedulingConfigurer {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -30,6 +30,7 @@ import groovy.lang.GroovyObject;
* @since 2.0.2
* @see GroovyScriptFactory
*/
@FunctionalInterface
public interface GroovyObjectCustomizer {
/**

View File

@ -146,6 +146,7 @@ public abstract class MethodIntrospector {
* A callback interface for metadata lookup on a given method.
* @param <T> the type of metadata returned
*/
@FunctionalInterface
public interface MetadataLookup<T> {
/**

View File

@ -203,6 +203,7 @@ public class OrderComparator implements Comparator<Object> {
* Strategy interface to provide an order source for a given object.
* @since 4.1
*/
@FunctionalInterface
public interface OrderSourceProvider {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.
@ -28,6 +28,7 @@ package org.springframework.core.convert.converter;
* @param <S> the source type
* @param <T> the target type
*/
@FunctionalInterface
public interface Converter<S, T> {
/**

View File

@ -27,6 +27,7 @@ package org.springframework.core.io;
* @since 4.3
* @see DefaultResourceLoader#addProtocolResolver
*/
@FunctionalInterface
public interface ProtocolResolver {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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 java.io.InputStream;
* @author Mark Fisher
* @since 3.0.5
*/
@FunctionalInterface
public interface Deserializer<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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 java.io.OutputStream;
* @author Mark Fisher
* @since 3.0.5
*/
@FunctionalInterface
public interface Serializer<T> {
/**

View File

@ -32,6 +32,7 @@ package org.springframework.core.task;
* @see TaskExecutor#execute(Runnable)
* @see SimpleAsyncTaskExecutor#setTaskDecorator
*/
@FunctionalInterface
public interface TaskDecorator {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -35,6 +35,7 @@ import java.util.concurrent.Executor;
* @since 2.0
* @see java.util.concurrent.Executor
*/
@FunctionalInterface
public interface TaskExecutor extends Executor {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2016 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.
@ -30,6 +30,7 @@ import org.springframework.core.type.classreading.MetadataReaderFactory;
* @author Mark Fisher
* @since 2.5
*/
@FunctionalInterface
public interface TypeFilter {
/**

View File

@ -243,6 +243,7 @@ public class AutoPopulatingList<E> implements List<E>, Serializable {
* Factory interface for creating elements for an index-based access
* data structure such as a {@link java.util.List}.
*/
@FunctionalInterface
public interface ElementFactory<E> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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 @@ package org.springframework.util;
* @author Mark Fisher
* @since 3.0
*/
@FunctionalInterface
public interface ErrorHandler {
/**

View File

@ -212,7 +212,8 @@ public class PropertyPlaceholderHelper {
/**
* Strategy interface used to resolve replacement values for placeholders contained in Strings.
*/
public static interface PlaceholderResolver {
@FunctionalInterface
public interface PlaceholderResolver {
/**
* Resolve the supplied placeholder name to the replacement value.

View File

@ -755,6 +755,7 @@ public abstract class ReflectionUtils {
/**
* Action to take on each method.
*/
@FunctionalInterface
public interface MethodCallback {
/**
@ -768,6 +769,7 @@ public abstract class ReflectionUtils {
/**
* Callback optionally used to filter methods to be operated on by a method callback.
*/
@FunctionalInterface
public interface MethodFilter {
/**
@ -781,6 +783,7 @@ public abstract class ReflectionUtils {
/**
* Callback interface invoked on each field in the hierarchy.
*/
@FunctionalInterface
public interface FieldCallback {
/**
@ -794,6 +797,7 @@ public abstract class ReflectionUtils {
/**
* Callback optionally used to filter fields to be operated on by a field callback.
*/
@FunctionalInterface
public interface FieldFilter {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2016 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 @@ package org.springframework.util;
* @see org.springframework.beans.factory.config.BeanDefinitionVisitor#BeanDefinitionVisitor(StringValueResolver)
* @see org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
*/
@FunctionalInterface
public interface StringValueResolver {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 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.
@ -43,6 +43,7 @@ package org.springframework.util.backoff;
* @since 4.1
* @see BackOffExecution
*/
@FunctionalInterface
public interface BackOff {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 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 @@ package org.springframework.util.backoff;
* @since 4.1
* @see BackOff
*/
@FunctionalInterface
public interface BackOffExecution {
/**

View File

@ -22,6 +22,7 @@ package org.springframework.util.concurrent;
* @author Sebastien Deleuze
* @since 4.1
*/
@FunctionalInterface
public interface FailureCallback {
/**

View File

@ -22,6 +22,7 @@ package org.springframework.util.concurrent;
* @author Sebastien Deleuze
* @since 4.1
*/
@FunctionalInterface
public interface SuccessCallback<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2016 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.
@ -28,6 +28,7 @@ import org.springframework.core.convert.TypeDescriptor;
* @author Andy Clement
* @since 3.0
*/
@FunctionalInterface
public interface ConstructorResolver {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2016 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.
@ -30,6 +30,7 @@ import java.util.List;
* @author Andy Clement
* @since 3.0.1
*/
@FunctionalInterface
public interface MethodFilter {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2016 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 @@ package org.springframework.expression;
* @author Andy Clement
* @since 3.0
*/
@FunctionalInterface
public interface TypeLocator {
/**

View File

@ -838,12 +838,14 @@ public class CodeFlow implements Opcodes {
return clazzName;
}
@FunctionalInterface
public interface FieldAdder {
public void generateField(ClassWriter cw, CodeFlow codeflow);
void generateField(ClassWriter cw, CodeFlow codeflow);
}
@FunctionalInterface
public interface ClinitAdder {
public void generateCode(MethodVisitor mv, CodeFlow codeflow);
void generateCode(MethodVisitor mv, CodeFlow codeflow);
}
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -40,6 +40,7 @@ import org.springframework.dao.DataAccessException;
* @see JdbcTemplate#execute(String, CallableStatementCallback)
* @see JdbcTemplate#execute(CallableStatementCreator, CallableStatementCallback)
*/
@FunctionalInterface
public interface CallableStatementCallback<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -40,6 +40,7 @@ import java.sql.SQLException;
* @see JdbcTemplate#call
* @see SqlProvider
*/
@FunctionalInterface
public interface CallableStatementCreator {
/**

View File

@ -37,6 +37,7 @@ import org.springframework.dao.DataAccessException;
* @see JdbcTemplate#query
* @see JdbcTemplate#update
*/
@FunctionalInterface
public interface ConnectionCallback<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -30,6 +30,7 @@ import java.util.Map;
* @see CallableStatementCreatorFactory#newCallableStatementCreator(ParameterMapper)
* @see org.springframework.jdbc.object.StoredProcedure#execute(ParameterMapper)
*/
@FunctionalInterface
public interface ParameterMapper {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 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.
@ -37,6 +37,7 @@ import java.sql.SQLException;
* @since 3.1
* @see JdbcTemplate#batchUpdate(String, java.util.Collection, int, ParameterizedPreparedStatementSetter)
*/
@FunctionalInterface
public interface ParameterizedPreparedStatementSetter<T> {
/**

View File

@ -40,6 +40,7 @@ import org.springframework.dao.DataAccessException;
* @see JdbcTemplate#execute(String, PreparedStatementCallback)
* @see JdbcTemplate#execute(PreparedStatementCreator, PreparedStatementCallback)
*/
@FunctionalInterface
public interface PreparedStatementCallback<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -40,6 +40,7 @@ import java.sql.SQLException;
* @see JdbcTemplate#update(PreparedStatementCreator)
* @see SqlProvider
*/
@FunctionalInterface
public interface PreparedStatementCreator {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -40,6 +40,7 @@ import java.sql.SQLException;
* @see JdbcTemplate#update(String, PreparedStatementSetter)
* @see JdbcTemplate#query(String, PreparedStatementSetter, ResultSetExtractor)
*/
@FunctionalInterface
public interface PreparedStatementSetter {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -46,6 +46,7 @@ import org.springframework.dao.DataAccessException;
* @see RowMapper
* @see org.springframework.jdbc.core.support.AbstractLobStreamingResultSetExtractor
*/
@FunctionalInterface
public interface ResultSetExtractor<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -42,6 +42,7 @@ import java.sql.SQLException;
* @see ResultSetExtractor
* @see RowCountCallbackHandler
*/
@FunctionalInterface
public interface RowCallbackHandler {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -45,6 +45,7 @@ import java.sql.SQLException;
* @see ResultSetExtractor
* @see org.springframework.jdbc.object.MappingSqlQuery
*/
@FunctionalInterface
public interface RowMapper<T> {
/**

View File

@ -33,6 +33,7 @@ import org.springframework.dao.DataAccessException;
* @since 16.03.2004
* @see JdbcTemplate#execute(StatementCallback)
*/
@FunctionalInterface
public interface StatementCallback<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 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 java.sql.SQLException;
* @see DatabasePopulatorUtils
* @see DataSourceInitializer
*/
@FunctionalInterface
public interface DatabasePopulator {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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 javax.sql.DataSource;
* @since 2.0
* @see org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager#setDataSourceLookup
*/
@FunctionalInterface
public interface DataSourceLookup {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -28,6 +28,7 @@ import java.sql.SQLException;
* @author Thomas Risberg
* @see JdbcUtils#extractDatabaseMetaData
*/
@FunctionalInterface
public interface DatabaseMetaDataCallback {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -33,6 +33,7 @@ import org.springframework.dao.DataAccessException;
* @author Juergen Hoeller
* @see org.springframework.dao.DataAccessException
*/
@FunctionalInterface
public interface SQLExceptionTranslator {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 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.
@ -33,6 +33,7 @@ import org.springframework.jms.config.JmsListenerEndpointRegistrar;
* @see EnableJms
* @see JmsListenerEndpointRegistrar
*/
@FunctionalInterface
public interface JmsListenerConfigurer {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -31,6 +31,7 @@ import javax.jms.Session;
* @see JmsTemplate#browse(BrowserCallback)
* @see JmsTemplate#browseSelected(String, BrowserCallback)
*/
@FunctionalInterface
public interface BrowserCallback<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -35,6 +35,7 @@ import javax.jms.Session;
* @author Mark Pollack
* @since 1.1
*/
@FunctionalInterface
public interface MessageCreator {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 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.
@ -35,6 +35,7 @@ import javax.jms.Session;
* @see JmsTemplate#execute(javax.jms.Destination, ProducerCallback)
* @see JmsTemplate#execute(String, ProducerCallback)
*/
@FunctionalInterface
public interface ProducerCallback<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -30,6 +30,7 @@ import javax.jms.Session;
* @since 1.1
* @see JmsTemplate#execute(SessionCallback)
*/
@FunctionalInterface
public interface SessionCallback<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -41,6 +41,7 @@ import javax.jms.Session;
* @see org.springframework.jms.listener.endpoint.JmsMessageEndpointManager
* @see javax.jms.MessageListener
*/
@FunctionalInterface
public interface SessionAwareMessageListener<M extends Message> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -38,6 +38,7 @@ import javax.jms.Session;
* @see org.springframework.jms.support.destination.DynamicDestinationResolver
* @see org.springframework.jms.support.destination.JndiDestinationResolver
*/
@FunctionalInterface
public interface DestinationResolver {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2016 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.
@ -23,6 +23,7 @@ package org.springframework.messaging;
* @author Iwein Fuld
* @since 4.0
*/
@FunctionalInterface
public interface MessageHandler {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2016 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.util.MimeType;
* @author Rossen Stoyanchev
* @since 4.0
*/
@FunctionalInterface
public interface ContentTypeResolver {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 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.
@ -23,6 +23,7 @@ package org.springframework.messaging.core;
* @author Mark Fisher
* @since 4.0
*/
@FunctionalInterface
public interface DestinationResolver<D> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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,6 +22,7 @@ package org.springframework.messaging.simp.user;
* @author Rossen Stoyanchev
* @since 4.2
*/
@FunctionalInterface
public interface SimpSubscriptionMatcher {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.
@ -34,6 +34,7 @@ import org.springframework.messaging.Message;
* @see org.springframework.messaging.simp.user.DefaultUserDestinationResolver
* @see UserDestinationMessageHandler
*/
@FunctionalInterface
public interface UserDestinationResolver {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2016 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.
@ -23,6 +23,7 @@ package org.springframework.messaging.tcp;
* @author Rossen Stoyanchev
* @since 4.0
*/
@FunctionalInterface
public interface ReconnectStrategy {
/**

View File

@ -30,6 +30,7 @@ import org.hibernate.Session;
* @see HibernateTemplate
* @see HibernateTransactionManager
*/
@FunctionalInterface
public interface HibernateCallback<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2016 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.
@ -32,6 +32,7 @@ package org.springframework.test.context;
* @since 4.0
* @see ActiveProfiles
*/
@FunctionalInterface
public interface ActiveProfilesResolver {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.http.client.ClientHttpRequest;
* @author Craig Walls
* @since 3.2
*/
@FunctionalInterface
public interface RequestMatcher {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.web.client.response.MockRestResponseCreators;
* @author Craig Walls
* @since 3.2
*/
@FunctionalInterface
public interface ResponseCreator {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.
@ -44,6 +44,7 @@ package org.springframework.test.web.servlet;
* @author Sam Brannen
* @since 3.2
*/
@FunctionalInterface
public interface ResultHandler {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.
@ -46,6 +46,7 @@ package org.springframework.test.web.servlet;
* @author Sam Brannen
* @since 3.2
*/
@FunctionalInterface
public interface ResultMatcher {
/**

View File

@ -26,6 +26,7 @@ import com.gargoylesoftware.htmlunit.WebRequest;
* @see org.springframework.test.web.servlet.htmlunit.HostRequestMatcher
* @see org.springframework.test.web.servlet.htmlunit.UrlRegexRequestMatcher
*/
@FunctionalInterface
public interface WebRequestMatcher {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2016 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.
@ -32,6 +32,7 @@ import org.springframework.mock.web.MockHttpServletRequest;
* @author Rob Winch
* @since 3.2
*/
@FunctionalInterface
public interface RequestPostProcessor {
/**

View File

@ -30,6 +30,7 @@ import org.springframework.dao.DataAccessException;
* @author Juergen Hoeller
* @since 2.0
*/
@FunctionalInterface
public interface PersistenceExceptionTranslator {
/**

View File

@ -40,6 +40,7 @@ import org.springframework.dao.DataAccessException;
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, javax.resource.cci.Record)
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, RecordCreator, RecordExtractor)
*/
@FunctionalInterface
public interface ConnectionCallback<T> {
/**

View File

@ -41,6 +41,7 @@ import org.springframework.dao.DataAccessException;
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, javax.resource.cci.Record)
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, RecordCreator, RecordExtractor)
*/
@FunctionalInterface
public interface InteractionCallback<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -45,6 +45,7 @@ import org.springframework.dao.DataAccessException;
* @see CciTemplate#createMappedRecord(String)
* @see CciTemplate#setOutputRecordCreator(RecordCreator)
*/
@FunctionalInterface
public interface RecordCreator {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -42,6 +42,7 @@ import org.springframework.dao.DataAccessException;
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, RecordCreator, RecordExtractor)
* @see javax.resource.cci.ResultSet
*/
@FunctionalInterface
public interface RecordExtractor<T> {
/**

View File

@ -630,6 +630,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
* Simple callback interface for proceeding with the target invocation.
* Concrete interceptors/aspects adapt this to their invocation mechanism.
*/
@FunctionalInterface
protected interface InvocationCallback {
Object proceedWithInvocation() throws Throwable;

View File

@ -32,6 +32,7 @@ import org.springframework.transaction.TransactionStatus;
* @see TransactionTemplate
* @see CallbackPreferringPlatformTransactionManager
*/
@FunctionalInterface
public interface TransactionCallback<T> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.
@ -41,6 +41,7 @@ public interface StreamingHttpOutputMessage extends HttpOutputMessage {
* It is useful with HTTP client libraries that provide indirect access to an
* {@link OutputStream} via a callback mechanism.
*/
@FunctionalInterface
interface Body {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 the original author or authors.
* Copyright 2002-2016 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.
@ -30,6 +30,7 @@ import org.springframework.http.HttpRequest;
* @see ClientHttpRequestInterceptor
* @since 3.1
*/
@FunctionalInterface
public interface ClientHttpRequestExecution {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2016 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.
@ -28,6 +28,7 @@ import org.springframework.http.HttpMethod;
* @author Arjen Poutsma
* @since 3.0
*/
@FunctionalInterface
public interface ClientHttpRequestFactory {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@ -31,6 +31,7 @@ import org.springframework.http.HttpRequest;
* @author Arjen Poutsma
* @since 3.1
*/
@FunctionalInterface
public interface ClientHttpRequestInterceptor {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.
@ -41,6 +41,7 @@ import org.springframework.remoting.support.RemoteInvocationResult;
* @since 1.1
* @see HttpInvokerClientInterceptor#setHttpInvokerRequestExecutor
*/
@FunctionalInterface
public interface HttpInvokerRequestExecutor {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 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.
@ -74,6 +74,7 @@ import javax.servlet.http.HttpServletResponse;
* @see org.springframework.remoting.caucho.HessianServiceExporter
* @see org.springframework.remoting.caucho.BurlapServiceExporter
*/
@FunctionalInterface
public interface HttpRequestHandler {
/**

View File

@ -28,6 +28,7 @@ import org.springframework.web.context.request.NativeWebRequest;
* @author Rossen Stoyanchev
* @since 3.2
*/
@FunctionalInterface
public interface ContentNegotiationStrategy {
/**

View File

@ -41,6 +41,7 @@ import org.springframework.web.context.request.NativeWebRequest;
* @since 2.5.2
* @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#setCustomArgumentResolvers
*/
@FunctionalInterface
public interface WebArgumentResolver {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2016 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.
@ -30,6 +30,7 @@ import org.springframework.http.client.AsyncClientHttpRequest;
* @see org.springframework.web.client.AsyncRestTemplate#execute
* @since 4.0
*/
@FunctionalInterface
public interface AsyncRequestCallback {
/**

Some files were not shown because too many files have changed in this diff Show More