Java Reflection Primitive isPrimitiveClass(String primitiveClassName)

Here you can find the source of isPrimitiveClass(String primitiveClassName)

Description

is Primitive Class

License

LGPL

Declaration

public static boolean isPrimitiveClass(String primitiveClassName) 

Method Source Code

//package com.java2s;
/*/*from  w w w.  j  a  va2 s .com*/
 * JFox - The most lightweight Java EE Application Server!
 * more details please visit http://www.huihoo.org/jfox or http://www.jfox.org.cn.
 *
 * JFox is licenced and re-distributable under GNU LGPL.
 */

import java.util.HashMap;

import java.util.Map;

public class Main {
    private static Map<String, Class> primitiveStringToClass = new HashMap<String, Class>();

    public static boolean isPrimitiveClass(String primitiveClassName) {
        return primitiveStringToClass.containsKey(primitiveClassName);
    }

    public static boolean isPrimitiveClass(Class primitiveClass) {
        return primitiveStringToClass.containsKey(primitiveClass.getName());
    }
}

Related

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