Here you can find the source of isPrimitiveClass(Class> clazz)
Parameter | Description |
---|---|
clazz | a parameter |
public static boolean isPrimitiveClass(Class<?> clazz)
//package com.java2s; //License from project: Apache License import java.util.HashMap; import java.util.Map; public class Main { private static final Map<Class<?>, Class<?>> primitiveToObjectClassMap = new HashMap<Class<?>, Class<?>>(); /**/*from w ww . java 2 s . c o m*/ * Determines whether the given clazz is a primitive class. * * @param clazz * @return */ public static boolean isPrimitiveClass(Class<?> clazz) { return primitiveToObjectClassMap.containsKey(clazz); } }