All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.flextrade.jfixture.requests.enrichers.CompositeRequestEnricher Maven / Gradle / Ivy

Go to download

JFixture is an open source library based on the popular .NET library, AutoFixture

There is a newer version: 2.7.2
Show newest version
package com.flextrade.jfixture.requests.enrichers;

import java.lang.annotation.Annotation;

public class CompositeRequestEnricher implements RequestEnricher {

    private final RequestEnricher[] enrichers;

    public CompositeRequestEnricher(RequestEnricher... enrichers) {
        this.enrichers = enrichers;
    }

    @Override
    public Object enrich(Object request, Annotation annotation) {
        for( RequestEnricher enricher : this.enrichers) {
            Object newRequest = enricher.enrich(request, annotation);
            if(newRequest != null) {
                return newRequest;
            }
        }

        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy