@Test public void getTypeDefaultValue_A$String_StringIsNull() throws Exception { String typeName = null; try { PrimitiveTypeUtil.getTypeDefaultValue(typeName); fail(); } catch (JUnitHelperCoreException e) { } }
public static final String getTypeDefaultValue(String typeName) { Assertion.on("typeName").mustNotBeEmpty(typeName); if (typeName.equals("byte")) return "0"; if (typeName.equals("short")) return "0"; if (typeName.equals("int")) return "0"; if (typeName.equals("long")) return "0L"; if (typeName.equals("char")) return "'\u0000'"; if (typeName.equals("float")) return "0.0F"; if (typeName.equals("double")) return "0.0"; if (typeName.equals("boolean")) return "false"; if (typeName.equals("void")) return "void"; throw new IllegalArgumentException("Not primitive type : " + typeName); }
PrimitiveTypeUtil { public static final String getTypeDefaultValue(String typeName) { Assertion.on("typeName").mustNotBeEmpty(typeName); if (typeName.equals("byte")) return "0"; if (typeName.equals("short")) return "0"; if (typeName.equals("int")) return "0"; if (typeName.equals("long")) return "0L"; if (typeName.equals("char")) return "'\u0000'"; if (typeName.equals("float")) return "0.0F"; if (typeName.equals("double")) return "0.0"; if (typeName.equals("boolean")) return "false"; if (typeName.equals("void")) return "void"; throw new IllegalArgumentException("Not primitive type : " + typeName); } }
PrimitiveTypeUtil { public static final String getTypeDefaultValue(String typeName) { Assertion.on("typeName").mustNotBeEmpty(typeName); if (typeName.equals("byte")) return "0"; if (typeName.equals("short")) return "0"; if (typeName.equals("int")) return "0"; if (typeName.equals("long")) return "0L"; if (typeName.equals("char")) return "'\u0000'"; if (typeName.equals("float")) return "0.0F"; if (typeName.equals("double")) return "0.0"; if (typeName.equals("boolean")) return "false"; if (typeName.equals("void")) return "void"; throw new IllegalArgumentException("Not primitive type : " + typeName); } private  PrimitiveTypeUtil(); }
PrimitiveTypeUtil { public static final String getTypeDefaultValue(String typeName) { Assertion.on("typeName").mustNotBeEmpty(typeName); if (typeName.equals("byte")) return "0"; if (typeName.equals("short")) return "0"; if (typeName.equals("int")) return "0"; if (typeName.equals("long")) return "0L"; if (typeName.equals("char")) return "'\u0000'"; if (typeName.equals("float")) return "0.0F"; if (typeName.equals("double")) return "0.0"; if (typeName.equals("boolean")) return "false"; if (typeName.equals("void")) return "void"; throw new IllegalArgumentException("Not primitive type : " + typeName); } private  PrimitiveTypeUtil(); static final boolean isPrimitive(String typeName); static final Class<?> getPrimitiveClass(String typeName); static final String getTypeDefaultValue(String typeName); }
PrimitiveTypeUtil { public static final String getTypeDefaultValue(String typeName) { Assertion.on("typeName").mustNotBeEmpty(typeName); if (typeName.equals("byte")) return "0"; if (typeName.equals("short")) return "0"; if (typeName.equals("int")) return "0"; if (typeName.equals("long")) return "0L"; if (typeName.equals("char")) return "'\u0000'"; if (typeName.equals("float")) return "0.0F"; if (typeName.equals("double")) return "0.0"; if (typeName.equals("boolean")) return "false"; if (typeName.equals("void")) return "void"; throw new IllegalArgumentException("Not primitive type : " + typeName); } private  PrimitiveTypeUtil(); static final boolean isPrimitive(String typeName); static final Class<?> getPrimitiveClass(String typeName); static final String getTypeDefaultValue(String typeName);  }