private static String scalarDefault(LeafCNode scalar) {
        if (scalar.getDefaultValue() == null) {
            return "";
        } else if (scalar instanceof EnumLeaf && scalar.getDefaultValue().getValue() == null) {
            return "";
        } else if (scalar instanceof EnumLeaf) {
            return nodeClass(scalar) + "." + scalar.getDefaultValue().getStringRepresentation();
        } else if (scalar instanceof LongLeaf) {
            return scalar.getDefaultValue().getStringRepresentation() + "L";
        } else if (scalar instanceof DoubleLeaf) {
            return scalar.getDefaultValue().getStringRepresentation() + "D";
        } else {
            return scalar.getDefaultValue().getStringRepresentation();
        }
    }
@author gjoranv
@author Tony Vaagenes
@author ollivir
configgen/src/main/java/com/yahoo/config/codegen/ConfigGenerator.java