Class Coordinates
- java.lang.Object
-
- org.apache.maven.plugins.dependency.exclusion.Coordinates
-
- All Implemented Interfaces:
java.lang.Comparable<Coordinates>
class Coordinates extends java.lang.Object implements java.lang.Comparable<Coordinates>
Simple "record" to hold the coordinates of the dependency which is excluded.When dealing with exclusions the version is not important. Only groupId and artifactId is used.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringartifactIdprivate org.apache.maven.model.Dependencydependencyprivate java.lang.StringgroupIdprivate org.apache.maven.model.InputLocationlocation
-
Constructor Summary
Constructors Modifier Constructor Description privateCoordinates(java.lang.String groupId, java.lang.String artifactId, org.apache.maven.model.Dependency dependency, org.apache.maven.model.InputLocation location)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Coordinates that)static Coordinatescoordinates(java.lang.String groupId, java.lang.String artifactId)static Coordinatescoordinates(org.apache.maven.model.Dependency dependency)static Coordinatescoordinates(org.apache.maven.model.Exclusion exclusion)private static java.nio.file.PathcreatePathProxy(java.lang.String value)In order to reuse the glob matcher from the filesystem, we need to create Path instances.booleanequals(java.lang.Object o)java.lang.StringgetArtifactId()org.apache.maven.model.DependencygetDependency()(package private) java.util.function.Predicate<Coordinates>getExclusionPattern()java.lang.StringgetGroupId()inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
coordinates
public static Coordinates coordinates(java.lang.String groupId, java.lang.String artifactId)
-
coordinates
public static Coordinates coordinates(org.apache.maven.model.Dependency dependency)
-
coordinates
public static Coordinates coordinates(org.apache.maven.model.Exclusion exclusion)
-
getGroupId
public java.lang.String getGroupId()
-
getArtifactId
public java.lang.String getArtifactId()
-
getDependency
public org.apache.maven.model.Dependency getDependency()
-
getExclusionPattern
java.util.function.Predicate<Coordinates> getExclusionPattern()
-
createPathProxy
private static java.nio.file.Path createPathProxy(java.lang.String value)
In order to reuse the glob matcher from the filesystem, we need to create Path instances. Those are only used with the toString method. This hack works because the only system-dependent thing is the path separator which should not be part of the groupId or artifactId.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(Coordinates that)
- Specified by:
compareToin interfacejava.lang.Comparable<Coordinates>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-