Java Reflection Primitive resolvePrimitiveClassName(String name)

Here you can find the source of resolvePrimitiveClassName(String name)

Description

resolve Primitive Class Name

License

Apache License

Declaration

public static Class<?> resolvePrimitiveClassName(String name) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.HashMap;

import java.util.Map;

public class Main {
    private static final Map<String, Class<?>> primitiveTypeNameMap = new HashMap(32);

    public static Class<?> resolvePrimitiveClassName(String name) {
        Class result = null;/*from w w  w  .  j a v a 2 s.  c  om*/
        if (name != null && name.length() <= 8) {
            result = primitiveTypeNameMap.get(name);
        }

        return result;
    }
}

Related

  1. primitiveArraysForName(String className)
  2. primitiveToWrapper(final Class cls)
  3. primitiveToWrapper(final Class cls)
  4. resolveClassPrimitiveAware(String className)
  5. resolvePrimitiveClassName(String name)
  6. resolvePrimitiveIfNecessary(Class clazz)
  7. resolvePrimitiveType(Class clazz)
  8. toPrimitive(String primitiveJson, Class clazz)
  9. unwrapPrimitive(final Class clazz)