@ SuppressWarnings ( "unchecked" ) public static < T > T getJlsDefaultValue ( Class < T > type ) { if ( ! type . isPrimitive ( ) ) { return null ; } return ( T ) JLS_PRIMITIVE_DEFAULT_VALUES . get ( type ) ; }
See also JLS8 4 . 12 . 5 Initial Values of Variables .