public class PackageDependency extends Object
| Constructor and Description |
|---|
PackageDependency(FilePosition position,
String pkgManager,
String pkgName,
String version)
Create a package dependency
|
PackageDependency(FilePosition position,
String pkgManager,
String groupId,
String pkgName,
String version) |
PackageDependency(String pkgManager,
String pkgName,
String version)
Create a package dependency
|
PackageDependency(String pkgManager,
String groupId,
String artifactId,
String version)
Create a package dependency
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
ArtifactResource |
getArtifact()
Get the artifact for this dependency
|
String |
getDescription()
Get a description of the dependency
|
String |
getGroupId()
Get the group id/name
|
String |
getId()
Get the simple fully descriptive ID for the package
|
int |
getLength()
Length of the selection
|
int |
getLine()
Get the line number of the dependency owner file that defines this dependency
|
String |
getName()
Get the artifact id/name
|
int |
getOffset()
Get the character offset
|
boolean |
getOptional()
Is this an optional dependency?
|
String |
getPackageManager()
Get the package manager name
|
ScmResource |
getScm()
Get the SCM resource that is deemed to be the dependency source
|
String |
getVersion()
Get the package version
|
VulnerabilityResource[] |
getVulnerabilities()
Get the vulnerabilities that apply to the package
|
int |
hashCode() |
boolean |
isRoot()
Is this a root package, which means it is directly referenced
(as opposed to transitively).
|
void |
setArtifact(ArtifactResource artifact)
Set the artifact that is deemed to be the best match.
|
void |
setIsRoot(boolean b)
Is this a root package, which means it is directly referenced
(as opposed to transitively).
|
void |
setOptional(Boolean optional)
Indicates that this is an "optional" package
|
void |
setScm(ScmResource scmResource)
Set the SCM resource that is deemed to be the dependency source
|
String |
toString() |
public PackageDependency(FilePosition position, String pkgManager, String pkgName, String version)
position - Position of the dependencypkgManager - Package manager the dependency belongs topkgName - The package nameversion - The versionpublic PackageDependency(FilePosition position, String pkgManager, String groupId, String pkgName, String version)
position - pkgManager - groupId - pkgName - version - public PackageDependency(String pkgManager, String pkgName, String version)
pkgManager - Package manager the dependency belongs topkgName - The package nameversion - The versionpublic String getPackageManager()
public String getName()
public String getGroupId()
public String getVersion()
public int getLine()
public int getOffset()
public int getLength()
public void setArtifact(ArtifactResource artifact)
artifact - Set the artifact for the packagepublic void setScm(ScmResource scmResource)
scmResource - The SCM resource that was found for the packagepublic ArtifactResource getArtifact()
public ScmResource getScm()
public String getDescription()
public VulnerabilityResource[] getVulnerabilities() throws IOException
IOException - On errorpublic String getId()
public void setOptional(Boolean optional)
optional - True if this is an optional packagepublic boolean getOptional()
public void setIsRoot(boolean b)
b - True if this is a root packagepublic boolean isRoot()
Copyright © 2015. All rights reserved.