JkModuleId { public static JkModuleId of(String group, String name) { JkUtilsAssert.argument(!JkUtilsString.isBlank(group), "Module group can't be empty"); JkUtilsAssert.argument(!JkUtilsString.isBlank(name), "Module name can't be empty"); return new JkModuleId(group, name); } private  JkModuleId(String group, String name); static JkModuleId of(String group, String name); static JkModuleId of(String groupAndName); String getGroup(); String getName(); String getDotedName(); String getGroupAndName(); JkVersionedModule withVersion(String version); JkVersionedModule withVersion(JkVersion version); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); final static Comparator<JkModuleId> GROUP_NAME_COMPARATOR; }
@Test public void testOf() { final String groupAndName = "org.springframework.boot:spring-boot-starter-data-rest"; final JkModuleId jkModuleId = JkModuleId.of(groupAndName); Assert.assertEquals("org.springframework.boot", jkModuleId.getGroup()); Assert.assertEquals("spring-boot-starter-data-rest", jkModuleId.getName()); }