Java Reflection Primitive getDefaultValue(Class primitive)

Here you can find the source of getDefaultValue(Class primitive)

Description

get Default Value

License

Apache License

Declaration

public static Object getDefaultValue(Class<?> primitive) 

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<Class<?>, Object> defaultPrimitiveValues = new HashMap<>();

    public static Object getDefaultValue(Class<?> primitive) {
        return defaultPrimitiveValues.get(primitive);
    }//from   w  ww.j  a  va  2 s. c  om
}

Related

  1. convertToPrimitive(Class type)
  2. convertWrapperToPrimitive(Class clazz)
  3. createDefaultPrimitive(Class type)
  4. getBENameByPrimitiveClassName( String implementClassName)
  5. getDefaultPrimitiveValue(Class clazz)
  6. getDefaultValueForPrimitive(Class type)
  7. getNullOrPrimitiveDefault(Class to)
  8. getPrimitive(final String classname)
  9. getPrimitiveClass(Class wrapper)