REOPENED - BATCH-779: RFC: make FieldSetMapper and LineAggregator extend ItemProcessor

remove the "extends ItemProcessor" clauses
This commit is contained in:
robokaso
2008-10-09 11:03:46 +00:00
parent 3df72df1b1
commit 81513dbdc6
8 changed files with 14 additions and 11 deletions

View File

@@ -153,7 +153,7 @@ public class BeanWrapperFieldSetMapper<T> extends DefaultPropertyEditorRegistrar
* the {@link DataBinder} from {@link #createBinder(Object)} has errors
* after binding).
*
* @see org.springframework.batch.item.file.mapping.FieldSetMapper#process(Object)
* @see org.springframework.batch.item.file.mapping.FieldSetMapper#process(FieldSet)
*/
@SuppressWarnings("unchecked")
public T process(FieldSet fs) {

View File

@@ -16,7 +16,6 @@
package org.springframework.batch.item.file.mapping;
import org.springframework.batch.item.ItemProcessor;
/**
* Interface that is used to map data obtained from a {@link FieldSet} into an
@@ -26,5 +25,7 @@ import org.springframework.batch.item.ItemProcessor;
* @author Dave Syer
*
*/
public interface FieldSetMapper<T> extends ItemProcessor<FieldSet, T> {
public interface FieldSetMapper<T> {
T process(FieldSet fieldSet);
}

View File

@@ -16,7 +16,6 @@
package org.springframework.batch.item.file.transform;
import org.springframework.batch.item.ItemProcessor;
@@ -25,5 +24,7 @@ import org.springframework.batch.item.ItemProcessor;
*
* @author Dave Syer
*/
public interface LineAggregator<T> extends ItemProcessor<T, String>{
public interface LineAggregator<T> {
String process(T item);
}

View File

@@ -16,7 +16,6 @@
package org.springframework.batch.item.file.transform;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.file.mapping.FieldSet;
@@ -27,5 +26,7 @@ import org.springframework.batch.item.file.mapping.FieldSet;
* @author tomas.slanina
*
*/
public interface LineTokenizer extends ItemProcessor<String, FieldSet> {
public interface LineTokenizer {
FieldSet process(String line);
}

View File

@@ -31,7 +31,7 @@ public class PrefixMatchingCompositeLineTokenizer implements LineTokenizer {
this.tokenizers = new LinkedHashMap<String, LineTokenizer>(tokenizers);
}
public FieldSet process(String line) throws Exception {
public FieldSet process(String line) {
if (line == null) {
return new DefaultFieldSet(new String[0]);

View File

@@ -31,7 +31,7 @@ public class RecursiveCollectionLineAggregator<T> implements LineAggregator<Coll
* (non-Javadoc)
* @see org.springframework.batch.item.file.transform.LineAggregator#aggregate(java.lang.Object)
*/
public String process(Collection<T> items) throws Exception {
public String process(Collection<T> items) {
StringBuilder builder = new StringBuilder();
for (T value : items) {
builder.append(delegate.process(value) + LINE_SEPARATOR);