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

org.yes.tools.utils.ValueUtil Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
package org.yes.tools.utils;

import lombok.extern.slf4j.Slf4j;

import java.util.Map;

@Slf4j
public class ValueUtil {
    public static boolean isPrimitive(Object value) {
        try {
            if (value instanceof Map) {
                return false;
            }
            return ((Class) value.getClass().getField("TYPE").get(null)).isPrimitive();
        } catch (IllegalAccessException | NoSuchFieldException e) {
            log.error(e.getMessage(), e);
        }
        return false;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy