Class Defaults


  • public class Defaults
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Defaults()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String defaultValueAsLiteral​(java.lang.Class<?> type)
      Returns a String literal representation of the default value of type as defined by JLS --- 0 for numbers, false for boolean and '\0' for char.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Defaults

        public Defaults()
    • Method Detail

      • defaultValueAsLiteral

        public static java.lang.String defaultValueAsLiteral​(java.lang.Class<?> type)
        Returns a String literal representation of the default value of type as defined by JLS --- 0 for numbers, false for boolean and '\0' for char. For non-primitive types and void, "null" is returned.
        Parameters:
        type - the type
        Returns:
        a String literal representation of the default value of type as defined by JLS