Add @FunctionalInterface where appropriate

Resolves #4107
This commit is contained in:
Taeik Lim
2022-04-29 20:29:52 +09:00
committed by Fadhel Mahmoud Ben Hassine
parent 8b6343fc8f
commit ed945ca61d
16 changed files with 46 additions and 15 deletions

View File

@@ -23,8 +23,10 @@ import org.springframework.lang.Nullable;
* @author Dave Syer
* @author Lucas Ward
* @author Mahmoud Ben Hassine
* @author Taeik Lim
* @since 2.0
*/
@FunctionalInterface
public interface JobParametersIncrementer {
/**

View File

@@ -23,8 +23,10 @@ import org.springframework.lang.Nullable;
*
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @author Taeik Lim
*
*/
@FunctionalInterface
public interface JobParametersValidator {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2018 the original author or authors.
* Copyright 2006-2022 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,8 +27,10 @@ import org.springframework.lang.Nullable;
*
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @author Taeik Lim
* @since 2.0
*/
@FunctionalInterface
public interface JobExecutionDecider {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2022 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,8 +32,9 @@ import org.springframework.batch.core.repository.JobRestartException;
*
* @author Lucas Ward
* @author Dave Syer
* @author Taeik Lim
*/
@FunctionalInterface
public interface JobLauncher {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2021 the original author or authors.
* Copyright 2006-2022 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,8 +30,10 @@ import org.springframework.batch.item.ExecutionContext;
*
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @author Taeik Lim
* @since 2.0
*/
@FunctionalInterface
public interface PartitionHandler {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2022 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,8 +27,10 @@ import org.springframework.batch.item.ExecutionContext;
* unique filenames.
*
* @author Dave Syer
* @author Taeik Lim
* @since 2.0
*/
@FunctionalInterface
public interface Partitioner {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2008-2009 the original author or authors.
* Copyright 2008-2022 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,9 +24,11 @@ import org.springframework.batch.core.StepExecution;
* partitioned or remote execution.
*
* @author Dave Syer
* @author Taeik Lim
* @since 2.1
*
*/
@FunctionalInterface
public interface StepExecutionAggregator {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2022 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.
@@ -20,8 +20,10 @@ package org.springframework.batch.core.step.item;
* itself cannot be modified to properly override equals.
*
* @author Dave Syer
* @author Taeik Lim
*
*/
@FunctionalInterface
public interface KeyGenerator {
Object getKey(Object item);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2010 the original author or authors.
* Copyright 2006-2022 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,8 +23,10 @@ import org.springframework.batch.core.StepExecution;
* Strategy interface for translating a {@link StepExecution} into {@link JobParameters}.
*
* @author Dave Syer
* @author Taeik Lim
*
*/
@FunctionalInterface
public interface JobParametersExtractor {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2021 the original author or authors.
* Copyright 2006-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,9 @@ package org.springframework.batch.core.step.skip;
* @author Lucas Ward
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @author Taeik Lim
*/
@FunctionalInterface
public interface SkipPolicy {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2018 the original author or authors.
* Copyright 2006-2022 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,8 +25,10 @@ import org.springframework.lang.Nullable;
*
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @author Taeik Lim
*
*/
@FunctionalInterface
public interface Tasklet {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2020 the original author or authors.
* Copyright 2006-2022 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,9 +29,11 @@ import org.springframework.lang.Nullable;
* @author Robert Kasanicky
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @author Taeik Lim
* @param <I> type of input item
* @param <O> type of output item
*/
@FunctionalInterface
public interface ItemProcessor<I, O> {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2018 the original author or authors.
* Copyright 2006-2022 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,8 +35,10 @@ import org.springframework.lang.Nullable;
* @author Dave Syer
* @author Lucas Ward
* @author Mahmoud Ben Hassine
* @author Taeik Lim
* @since 1.0
*/
@FunctionalInterface
public interface ItemReader<T> {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2022 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,7 +35,9 @@ import java.util.List;
*
* @author Dave Syer
* @author Lucas Ward
* @author Taeik Lim
*/
@FunctionalInterface
public interface ItemWriter<T> {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2022 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,8 +25,10 @@ package org.springframework.batch.repeat;
* but these should work the same whether they are in a batch or not.
*
* @author Dave Syer
* @author Taeik Lim
*
*/
@FunctionalInterface
public interface RepeatOperations {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2022 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,8 +28,10 @@ import org.springframework.batch.repeat.RepeatContext;
*
* @author Dave Syer
* @author Robert Kasanicky
* @author Taeik Lim
*
*/
@FunctionalInterface
public interface ExceptionHandler {
/**