Package org.jboss.windup.config.metadata
Class TechnologyReference
- java.lang.Object
-
- org.jboss.windup.config.metadata.TechnologyReference
-
public class TechnologyReference extends Object
Represents a technology with a name (id) andVersionRange. An example of this would be "eap:7", where "eap" is the id and "7" the version.- Author:
- Lincoln Baxter, III
-
-
Constructor Summary
Constructors Constructor Description TechnologyReference()DO NOT USE -- This is just here to make proxies possibleTechnologyReference(String id)Construct a newTechnologyReferenceusing the givenStringID.TechnologyReference(String id, String versionRange)TechnologyReference(String id, org.jboss.forge.furnace.versions.VersionRange versionRange)TechnologyReference(org.jboss.windup.graph.model.TechnologyReferenceModel model)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetId()Get the name/ID of thisTechnologyReference.org.jboss.forge.furnace.versions.VersionRangegetVersionRange()Get theVersionRangeof thisTechnologyReference.StringgetVersionRangeAsString()This provides a parsable version string based upon the currentVersionRange.inthashCode()booleanmatches(TechnologyReference other)Returns true if the otherTechnologyReferencehas the same technology id and the two version ranges overlap.static TechnologyReferenceparseFromIDAndVersion(String idAndVersion)Parses aTechnologyReferencefrom a string that is formatted as either "id" or "id:versionRange".StringtoString()booleanversionRangesOverlap(org.jboss.forge.furnace.versions.VersionRange otherRange)Takes the givenVersionRangeobjects and returns true if there is any overlap between the two ranges.
-
-
-
Constructor Detail
-
TechnologyReference
public TechnologyReference()
DO NOT USE -- This is just here to make proxies possible
-
TechnologyReference
public TechnologyReference(org.jboss.windup.graph.model.TechnologyReferenceModel model)
-
TechnologyReference
public TechnologyReference(String id, org.jboss.forge.furnace.versions.VersionRange versionRange)
-
TechnologyReference
public TechnologyReference(String id)
Construct a newTechnologyReferenceusing the givenStringID.
-
-
Method Detail
-
parseFromIDAndVersion
public static TechnologyReference parseFromIDAndVersion(String idAndVersion)
Parses aTechnologyReferencefrom a string that is formatted as either "id" or "id:versionRange".
-
getId
public String getId()
Get the name/ID of thisTechnologyReference.
-
getVersionRange
public org.jboss.forge.furnace.versions.VersionRange getVersionRange()
Get theVersionRangeof thisTechnologyReference.
-
matches
public boolean matches(TechnologyReference other)
Returns true if the otherTechnologyReferencehas the same technology id and the two version ranges overlap.
-
versionRangesOverlap
public boolean versionRangesOverlap(org.jboss.forge.furnace.versions.VersionRange otherRange)
Takes the givenVersionRangeobjects and returns true if there is any overlap between the two ranges.If either is null, then it is treated as overlapping.
-
getVersionRangeAsString
public String getVersionRangeAsString()
This provides a parsable version string based upon the currentVersionRange. If the version range is null, this will return null.
-
-