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

org.nomin.core.preprocessing.ConverterPreprocessing Maven / Gradle / Ivy

Go to download

Nomin is a mapping engine for the Java platform. It provides abilities to transform object trees according to declarative mapping rules. Main features of Nomin are no XML configuration, intuitively looking mapping, using arbitrary expressions and method invocations in mappings, pre and postprocessing right in a mapping listing, customizations. It's applicable for any Java compatible classes, not only JavaBeans.

There is a newer version: 1.2.2
Show newest version
package org.nomin.core.preprocessing;

import org.nomin.util.ScalarConverter;

/**
 * Converts a value using provided {@link org.nomin.util.ScalarConverter}.
 * @author Dmitry Dobrynin
 *         Created 28.04.2010 15:41:32
 */
public class ConverterPreprocessing extends Preprocessing {
    private ScalarConverter scalarConverter;

    public ConverterPreprocessing(ScalarConverter scalarConverter) {
        this.scalarConverter = scalarConverter;
    }

    public Object preprocess(Object source) {
        return source != null ? scalarConverter.convert(source) : null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy