mirror of https://gitee.com/stylefeng/roses
【8.3.0】【scanner】判断数字类型,排除掉Long
parent
3968027576
commit
8beffddd40
|
@ -124,9 +124,14 @@ public class ClassTypeUtil {
|
|||
*/
|
||||
public static boolean validateNumericTypeFlag(Class<?> clazz) {
|
||||
|
||||
// 排除掉Long类型,前端不识别Long类型
|
||||
if (clazz == Long.class || clazz == long.class) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 如果是原始类型
|
||||
if (clazz.isPrimitive()) {
|
||||
return clazz == byte.class || clazz == short.class || clazz == int.class || clazz == long.class || clazz == float.class || clazz == double.class;
|
||||
else if (clazz.isPrimitive()) {
|
||||
return clazz == byte.class || clazz == short.class || clazz == int.class || clazz == float.class || clazz == double.class;
|
||||
}
|
||||
|
||||
// 如果是包装类型
|
||||
|
|
Loading…
Reference in New Issue