@Test public void testJavaLangTypeFormatJavaTypeWithoutAddTypeGeneratesCorrectFQNs() throws Exception { final String baseType = "myType"; final String packageType = "java.lang"; final String fullyQualifiedType = packageType + "." + baseType; assertEquals(baseType, importUtils.formatJavaType(fullyQualifiedType)); }
public String formatJavaType(String typeName, boolean usePrimitives) { if (usePrimitives) { String primitive = primitivesForClasses.get(typeName); return (primitive != null) ? primitive : formatJavaType(typeName); } else { String primitiveClass = classesForPrimitives.get(typeName); return (primitiveClass != null) ? formatJavaType(primitiveClass) : formatJavaType(typeName); } }
ImportUtils { public String formatJavaType(String typeName, boolean usePrimitives) { if (usePrimitives) { String primitive = primitivesForClasses.get(typeName); return (primitive != null) ? primitive : formatJavaType(typeName); } else { String primitiveClass = classesForPrimitives.get(typeName); return (primitiveClass != null) ? formatJavaType(primitiveClass) : formatJavaType(typeName); } } }
ImportUtils { public String formatJavaType(String typeName, boolean usePrimitives) { if (usePrimitives) { String primitive = primitivesForClasses.get(typeName); return (primitive != null) ? primitive : formatJavaType(typeName); } else { String primitiveClass = classesForPrimitives.get(typeName); return (primitiveClass != null) ? formatJavaType(primitiveClass) : formatJavaType(typeName); } }  }
ImportUtils { public String formatJavaType(String typeName, boolean usePrimitives) { if (usePrimitives) { String primitive = primitivesForClasses.get(typeName); return (primitive != null) ? primitive : formatJavaType(typeName); } else { String primitiveClass = classesForPrimitives.get(typeName); return (primitiveClass != null) ? formatJavaType(primitiveClass) : formatJavaType(typeName); } }  void addReservedType(String typeName); void addType(String typeName); void setPackage(String packageName); String formatJavaType(String typeName, boolean usePrimitives); String formatJavaType(String typeName); String formatJavaTypeAsNonBooleanPrimitive(String type); boolean isNonBooleanPrimitive(String type); boolean isNumericPrimitive(String type); boolean isBoolean(String type); boolean isPrimitive(String type); boolean canUsePrimitive(ObjAttribute attribute); boolean canUsePrimitive(EmbeddableAttribute attribute); String generate(); String dbAttributeToJavaType(DbAttribute attribute); }
ImportUtils { public String formatJavaType(String typeName, boolean usePrimitives) { if (usePrimitives) { String primitive = primitivesForClasses.get(typeName); return (primitive != null) ? primitive : formatJavaType(typeName); } else { String primitiveClass = classesForPrimitives.get(typeName); return (primitiveClass != null) ? formatJavaType(primitiveClass) : formatJavaType(typeName); } }  void addReservedType(String typeName); void addType(String typeName); void setPackage(String packageName); String formatJavaType(String typeName, boolean usePrimitives); String formatJavaType(String typeName); String formatJavaTypeAsNonBooleanPrimitive(String type); boolean isNonBooleanPrimitive(String type); boolean isNumericPrimitive(String type); boolean isBoolean(String type); boolean isPrimitive(String type); boolean canUsePrimitive(ObjAttribute attribute); boolean canUsePrimitive(EmbeddableAttribute attribute); String generate(); String dbAttributeToJavaType(DbAttribute attribute); static final String[] importOrdering; }