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

org.fingertip.simpledao.utils.ClassUtils Maven / Gradle / Ivy

The newest version!
package org.fingertip.simpledao.utils;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Date;

public class ClassUtils {
	/**
	 * 判断是否为基本数据类型
	 * @param type
	 * @return
	 */
	public boolean isBaseType(Class type){
		return (
			type == byte.class ||
			type == Byte.class ||
			type == short.class ||
			type == Short.class ||
			type == char.class ||
			type == Character.class ||
			type == int.class ||
			type == Integer.class ||
			type == int.class ||
			type == Integer.class ||
			type == long.class ||
			type == Long.class ||
			type == float.class ||
			type == Float.class ||
			type == double.class ||
			type == Double.class ||
			type == boolean.class ||
			type == Boolean.class ||
			type == BigDecimal.class ||
			type == BigInteger.class ||
			type == String.class ||
			type == Date.class ||
			type == java.util.Date.class
		);
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy