@Test public void testPackageName() { Assert.assertEquals("", NamingUtil.getPackageName("")); Assert.assertEquals("", NamingUtil.getPackageName("SystemCodes")); Assert.assertEquals("org.opentides.bean", NamingUtil.getPackageName("org.opentides.bean.SystemCodes")); }
public static String getPackageName(String qualifiedName) { int idx = qualifiedName.lastIndexOf("."); if (idx > 0) { return qualifiedName.substring(0,idx); } else { return ""; } }
NamingUtil { public static String getPackageName(String qualifiedName) { int idx = qualifiedName.lastIndexOf("."); if (idx > 0) { return qualifiedName.substring(0,idx); } else { return ""; } } }
NamingUtil { public static String getPackageName(String qualifiedName) { int idx = qualifiedName.lastIndexOf("."); if (idx > 0) { return qualifiedName.substring(0,idx); } else { return ""; } } private  NamingUtil(); }
NamingUtil { public static String getPackageName(String qualifiedName) { int idx = qualifiedName.lastIndexOf("."); if (idx > 0) { return qualifiedName.substring(0,idx); } else { return ""; } } private  NamingUtil(); static String toLabel(String name); static String toGetterName(String name); static String toSetterName(String name); static String toAttributeName(String name); static String toElementName(String name); static String toDisplayName(String name); static String toSQLName(String name); static String getPropertyName(String methodName); static String getSimpleName(String qualifiedName); static String getPackageName(String qualifiedName); }
NamingUtil { public static String getPackageName(String qualifiedName) { int idx = qualifiedName.lastIndexOf("."); if (idx > 0) { return qualifiedName.substring(0,idx); } else { return ""; } } private  NamingUtil(); static String toLabel(String name); static String toGetterName(String name); static String toSetterName(String name); static String toAttributeName(String name); static String toElementName(String name); static String toDisplayName(String name); static String toSQLName(String name); static String getPropertyName(String methodName); static String getSimpleName(String qualifiedName); static String getPackageName(String qualifiedName);  }