GH-676 Add javadoc and minor polishing

This commit is contained in:
Oleg Zhurakousky
2021-05-25 11:50:13 +02:00
parent 3611716dd3
commit 3b9343df2c

View File

@@ -22,6 +22,7 @@ import java.util.function.Function;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.context.expression.MapAccessor; import org.springframework.context.expression.MapAccessor;
import org.springframework.expression.BeanResolver; import org.springframework.expression.BeanResolver;
import org.springframework.expression.Expression; import org.springframework.expression.Expression;
@@ -33,6 +34,8 @@ import org.springframework.messaging.support.MessageBuilder;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
* Class responsible for processing `input-header-mapping-expression`
* and modifying message headers accordingly.
* *
* @author Oleg Zhurakousky * @author Oleg Zhurakousky
* *
@@ -50,7 +53,7 @@ class InputEnricher implements Function<Object, Object> {
private final StandardEvaluationContext evalContext = new StandardEvaluationContext(); private final StandardEvaluationContext evalContext = new StandardEvaluationContext();
@SuppressWarnings({ "rawtypes", "unchecked" }) @SuppressWarnings({ "rawtypes", "unchecked" })
public InputEnricher(Map headerExpressions, @Nullable BeanResolver beanResolver) { InputEnricher(Map headerExpressions, @Nullable BeanResolver beanResolver) {
Assert.notEmpty(headerExpressions, "'headerExpressions' must not be null or empty"); Assert.notEmpty(headerExpressions, "'headerExpressions' must not be null or empty");
this.headerExpressions = headerExpressions; this.headerExpressions = headerExpressions;
this.evalContext.addPropertyAccessor(new MapAccessor()); this.evalContext.addPropertyAccessor(new MapAccessor());