@Test public void withoutClassifier() { DependencyAtom dependencyAtom = new DependencyAtom("net.ocheyedan", "ply", "1.0"); DependencyAtom transformed = dependencyAtom.withoutClassifier(); assertSame(dependencyAtom, transformed); dependencyAtom = dependencyAtom.withClassifier("sources"); transformed = dependencyAtom.withoutClassifier(); assertEquals("net.ocheyedan", transformed.namespace); assertEquals("ply", transformed.name); assertEquals("1.0", transformed.version); assertNull(transformed.artifactName); dependencyAtom = dependencyAtom.with("zip"); assertEquals("ply-1.0-sources.zip", dependencyAtom.artifactName); transformed = dependencyAtom.withoutClassifier(); assertEquals("net.ocheyedan", transformed.namespace); assertEquals("ply", transformed.name); assertEquals("1.0", transformed.version); assertEquals("ply-1.0.zip", transformed.artifactName); }
public DependencyAtom withoutClassifier() { if (artifactName == null) { return this; } String packaging = getSyntheticPackaging(); if (DEFAULT_PACKAGING.equals(packaging)) { return new DependencyAtom(namespace, name, version, transientDep); } else { return new DependencyAtom(namespace, name, version, composeArtifact(name, version, null, packaging), transientDep); } }
DependencyAtom { public DependencyAtom withoutClassifier() { if (artifactName == null) { return this; } String packaging = getSyntheticPackaging(); if (DEFAULT_PACKAGING.equals(packaging)) { return new DependencyAtom(namespace, name, version, transientDep); } else { return new DependencyAtom(namespace, name, version, composeArtifact(name, version, null, packaging), transientDep); } } }
DependencyAtom { public DependencyAtom withoutClassifier() { if (artifactName == null) { return this; } String packaging = getSyntheticPackaging(); if (DEFAULT_PACKAGING.equals(packaging)) { return new DependencyAtom(namespace, name, version, transientDep); } else { return new DependencyAtom(namespace, name, version, composeArtifact(name, version, null, packaging), transientDep); } } DependencyAtom(String namespace, String name, String version, String artifactName, boolean transientDep);  DependencyAtom(String namespace, String name, String version, String artifactName);  DependencyAtom(String namespace, String name, String version, boolean transientDep);  DependencyAtom(String namespace, String name, String version); }
DependencyAtom { public DependencyAtom withoutClassifier() { if (artifactName == null) { return this; } String packaging = getSyntheticPackaging(); if (DEFAULT_PACKAGING.equals(packaging)) { return new DependencyAtom(namespace, name, version, transientDep); } else { return new DependencyAtom(namespace, name, version, composeArtifact(name, version, null, packaging), transientDep); } } DependencyAtom(String namespace, String name, String version, String artifactName, boolean transientDep);  DependencyAtom(String namespace, String name, String version, String artifactName);  DependencyAtom(String namespace, String name, String version, boolean transientDep);  DependencyAtom(String namespace, String name, String version); String getPropertyName(); String getPropertyValue(); String getPropertyValueWithoutTransient(); String getResolvedPropertyValue(); String getArtifactName(); DependencyAtom with(String packaging); DependencyAtom withClassifier(String classifier); DependencyAtom withoutClassifier(); String getClassifier(); String getSyntheticPackaging(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static boolean isTransient(String atom); static String stripTransient(String atom); static DependencyAtom parse(String atom, AtomicReference<String> error); }
DependencyAtom { public DependencyAtom withoutClassifier() { if (artifactName == null) { return this; } String packaging = getSyntheticPackaging(); if (DEFAULT_PACKAGING.equals(packaging)) { return new DependencyAtom(namespace, name, version, transientDep); } else { return new DependencyAtom(namespace, name, version, composeArtifact(name, version, null, packaging), transientDep); } } DependencyAtom(String namespace, String name, String version, String artifactName, boolean transientDep);  DependencyAtom(String namespace, String name, String version, String artifactName);  DependencyAtom(String namespace, String name, String version, boolean transientDep);  DependencyAtom(String namespace, String name, String version); String getPropertyName(); String getPropertyValue(); String getPropertyValueWithoutTransient(); String getResolvedPropertyValue(); String getArtifactName(); DependencyAtom with(String packaging); DependencyAtom withClassifier(String classifier); DependencyAtom withoutClassifier(); String getClassifier(); String getSyntheticPackaging(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static boolean isTransient(String atom); static String stripTransient(String atom); static DependencyAtom parse(String atom, AtomicReference<String> error); static final String DEFAULT_PACKAGING; final String namespace; final String name; final String version; final String artifactName; final boolean transientDep; }