Here you can find the source of isPrimitiveOrPrimitiveWrapper(final Class> type)
Parameter | Description |
---|---|
type | a parameter |
public static boolean isPrimitiveOrPrimitiveWrapper(final Class<?> type)
//package com.java2s; // it under the terms of the GNU General Public License as published by import java.util.HashMap; public class Main { private static final HashMap<String, Class<?>> primitives = new HashMap<String, Class<?>>(); /**/* ww w . jav a2 s .co m*/ * @param type * @return */ public static boolean isPrimitiveOrPrimitiveWrapper(final Class<?> type) { return type.isPrimitive() || primitives.containsValue(type); } }