Here you can find the source of isPrimitiveClass(String className)
Parameter | Description |
---|---|
className | the class's name |
public static boolean isPrimitiveClass(String className)
//package com.java2s; //License from project: Apache License import java.util.HashMap; import java.util.Map; public class Main { private static Map primitiveClassMap = new HashMap(); /**// w w w . j a va 2s . c o m * Determine whether the class of the specified className is a primitive * type class * * @param className * the class's name * @return whether the class of the specified className is a primitive type * class */ public static boolean isPrimitiveClass(String className) { if (className != null && primitiveClassMap.containsKey(className)) { return true; } else { return false; } } }