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(java.lang.String groupId, java.lang.String name, VersionRange range)
groupId
- group idname
- namerange
- version rangepublic Dependency(PackageId id)
id
- package id.public java.lang.String getGroup()
public java.lang.String getName()
public VersionRange getRange()
@Deprecated public java.lang.String getPath()
public boolean matches(PackageId id)
id
- the package idtrue
if matchespublic static Dependency fromString(java.lang.String str)
null
is returned.str
- the stringpublic static Dependency[] parse(java.lang.String str)
toString(Dependency...)
)}str
- serialized stringpublic static Dependency[] fromString(java.lang.String... str)
str
- the stringspublic static java.lang.String toString(Dependency... deps)
deps
- the dependenciespublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"