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

org.n3r.eql.convert.EqlDecodeConverter Maven / Gradle / Ivy

There is a newer version: 0.1.19
Show newest version
package org.n3r.eql.convert;

import lombok.val;

import java.lang.annotation.Annotation;

/**
 * @author bingoohuang [[email protected]] Created on 2017/2/9.
 */
public class EqlDecodeConverter implements EqlConverter {
    @Override public Object convert(Annotation ann, Object src) {
        if (src == null) return null;

        val eqlDecode = (EqlDecode) ann;
        val srcStr = String.valueOf(src);
        val decodeValues = eqlDecode.value();
        val toType = eqlDecode.toType();
        return DecodeUtils.decode(srcStr, decodeValues, toType);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy