JkModuleDependency implements JkDependency { @SuppressWarnings("unchecked") public static JkModuleDependency of(JkModuleId moduleId, JkVersion version) { return new JkModuleDependency(moduleId, version, null, true, null, Collections.EMPTY_LIST, null); } private  JkModuleDependency(JkModuleId module, JkVersion version, String classifier,
            boolean transitive, String extension, List<JkDepExclude> excludes, Path ideProjectDir); @SuppressWarnings("unchecked") static JkModuleDependency of(JkModuleId moduleId, JkVersion version); static JkModuleDependency of(JkVersionedModule versionedModule); @SuppressWarnings("unchecked") static JkModuleDependency of(JkModuleId moduleId, String versionRange); static JkModuleDependency of(String group, String name, String version); static JkModuleDependency of(String description); static boolean isModuleDependencyDescription(String candidate); boolean withTransitive(); JkModuleId getModuleId(); JkVersion getVersion(); JkModuleDependency withTransitive(boolean transitive); boolean hasUnspecifedVersion(); JkModuleDependency withVersion(JkVersion version); JkModuleDependency withClassifier(String classifier); String getClassifier(); JkModuleDependency withExt(String extension); JkModuleDependency andExclude(JkDepExclude... depExcludes); JkModuleDependency andExclude(String groupeAndName); JkModuleDependency andExclude(Iterable<JkDepExclude> depExcludes); String getExt(); List<JkDepExclude> getExcludes(); @Override String toString(); @Override Path getIdeProjectDir(); @Override JkModuleDependency withIdeProjectDir(Path path); static final Comparator<JkModuleDependency> GROUP_NAME_COMPARATOR; }
@Test public void testOf() { final JkModuleDependency dep = JkModuleDependency.of("group:name::sources:version") .withTransitive(true).withExt("zip"); Assert.assertEquals("sources", dep.getClassifier()); Assert.assertTrue(dep.withTransitive()); final JkModuleDependency dep2 = JkModuleDependency.of("group:name:zip:sources:version"); Assert.assertEquals("zip", dep2.getExt()); final JkModuleDependency dep3 = JkModuleDependency.of("group:name:version:sources"); }