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

restx.endpoint.mappers.legacy.LegacyEndpointParameterMapperFactoryMachine Maven / Gradle / Ivy

There is a newer version: 1.2.0-rc2
Show newest version
package restx.endpoint.mappers.legacy;

import com.google.common.collect.ImmutableSet;
import restx.factory.*;
import restx.endpoint.mappers.legacy.LegacyEndpointParameterMapper;

@Machine
public class LegacyEndpointParameterMapperFactoryMachine extends SingleNameFactoryMachine {
    public static final Name NAME = Name.of(restx.endpoint.mappers.legacy.LegacyEndpointParameterMapper.class, "LegacyEndpointParameterMapper");

    public LegacyEndpointParameterMapperFactoryMachine() {
        super(0, new StdMachineEngine(NAME, 0, BoundlessComponentBox.FACTORY) {
private final Factory.Query converter = Factory.Query.byClass(restx.converters.MainStringConverter.class).mandatory();

            @Override
            public BillOfMaterials getBillOfMaterial() {
                return new BillOfMaterials(ImmutableSet.>of(
converter
                ));
            }

            @Override
            protected restx.endpoint.mappers.legacy.LegacyEndpointParameterMapper doNewComponent(SatisfiedBOM satisfiedBOM) {
                return new LegacyEndpointParameterMapper(
satisfiedBOM.getOne(converter).get().getComponent()
                );
            }
        });
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy