Java Reflection Primitive isPrimitiveOrPrimitiveWrapper(final Class type)

Here you can find the source of isPrimitiveOrPrimitiveWrapper(final Class type)

Description

is Primitive Or Primitive Wrapper

License

Open Source License

Parameter

Parameter Description
type a parameter

Declaration

public static boolean isPrimitiveOrPrimitiveWrapper(final Class<?> type) 

Method Source Code

//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);
    }
}

Related

  1. isPrimitiveClass(Class clazz)
  2. isPrimitiveClass(Class cls)
  3. isPrimitiveClass(String className)
  4. isPrimitiveClass(String primitiveClassName)
  5. isPrimitiveClassName(String cls)
  6. isPrimitiveOrWrapper(Class klass)
  7. isPrimitiveOrWrapper(Class type)
  8. isPrimitiveOrWrapper(final Class type)
  9. isPrimitiveWrapper(Class clazz)