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

io.vertx.up.uca.rs.mime.parse.StandardAtomic Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package io.vertx.up.uca.rs.mime.parse;

import io.vertx.ext.web.RoutingContext;
import io.vertx.up.atom.Epsilon;
import io.vertx.up.exception.WebException;
import io.vertx.up.uca.rs.Filler;

@SuppressWarnings("unchecked")
public class StandardAtomic implements Atomic {

    @Override
    public Epsilon ingest(final RoutingContext context,
                             final Epsilon income)
            throws WebException {
        final Filler filler = Filler.PARAMS.get(income.getAnnotation().annotationType());
        final Object value = filler.apply(income.getName(), income.getArgType(), context);
        return null == value ? income.setValue(null) : income.setValue((T) value);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy