Here you can find the source of isNumber(Class> clazz)
public static boolean isNumber(Class<?> clazz)
//package com.java2s; // This package is part of the Spiralcraft project and is licensed under import java.util.Map; import java.util.HashMap; public class Main { private static final Map<Class<?>, Class<?>> boxedEquivalentMap = new HashMap<Class<?>, Class<?>>(); /**/* w ww. j a v a 2 s . c o m*/ * Indicate whether the clazz represents a number */ public static boolean isNumber(Class<?> clazz) { return Number.class.isAssignableFrom(clazz) || Number.class.isAssignableFrom(boxedEquivalent(clazz)); } /** * Return the boxed equivalent of the specified Class */ public static Class<?> boxedEquivalent(Class<?> clazz) { return clazz.isPrimitive() ? boxedEquivalentMap.get(clazz) : clazz; } }