public class Dependency
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Dependency[] |
EMPTY
An empty dependency array
|
Constructor and Description |
---|
Dependency(PackageId id)
Creates a new dependency to the specified package id
|
Dependency(java.lang.String groupId,
java.lang.String name,
VersionRange range)
Creates a new dependency reference.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static Dependency[] |
fromString(java.lang.String... str)
Returns dependencies from the given strings.
|
static Dependency |
fromString(java.lang.String str)
Returns a dependency from a string.
|
java.lang.String |
getGroup()
Returns the group of the dependency
|
java.lang.String |
getName()
Returns the name of the dependency
|
java.lang.String |
getPath()
Deprecated.
As of 3.1.42, the storage location is implementation details.
|
VersionRange |
getRange()
Returns the version range
|
int |
hashCode() |
boolean |
matches(PackageId id)
Checks if the given package id matches this dependency specification.
|
static Dependency[] |
parse(java.lang.String str)
Parses a string serialization of dependency references generated by
toString(Dependency...) )} |
java.lang.String |
toString() |
static java.lang.String |
toString(Dependency... deps)
Returns a string representation from given dependencies.
|
public static final Dependency[] EMPTY
public Dependency(@Nonnull java.lang.String groupId, @Nonnull java.lang.String name, @Nullable VersionRange range)
groupId
- group idname
- namerange
- version rangepublic Dependency(@Nonnull PackageId id)
id
- package id.@Nonnull public java.lang.String getGroup()
@Nonnull public java.lang.String getName()
@Nonnull public VersionRange getRange()
@Deprecated @Nonnull public java.lang.String getPath()
public boolean matches(@Nonnull PackageId id)
id
- the package idtrue
if matches@Nullable public static Dependency fromString(@Nullable java.lang.String str)
null
is returned.str
- the string@Nonnull public static Dependency[] parse(@Nonnull java.lang.String str)
toString(Dependency...)
)}str
- serialized string@Nonnull public static Dependency[] fromString(@Nonnull java.lang.String... str)
str
- the strings@Nonnull public static java.lang.String toString(@Nonnull Dependency... deps)
deps
- the dependencies@Nonnull public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(@Nullable java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved