Class VersionSpecification
- java.lang.Object
-
- de.mnl.osgi.bnd.repository.maven.idxmvn.VersionSpecification
-
public class VersionSpecification extends Object
Class VersionSpecification.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VersionSpecification.Type
The Enum Type.
-
Constructor Summary
Constructors Constructor Description VersionSpecification()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MavenVersionRange
excluded(VersionSpecification[] specs, String artifact)
Find the exclude version range for the artifact with the given name.VersionSpecification.Type
getType()
Gets the type.static boolean
isForced(VersionSpecification[] specs, aQute.maven.api.Archive archive)
Checks if is forced.boolean
matches(String name)
Match the given artifact name against the specification.static VersionSpecification[]
parse(Properties props)
Parses the.static Set<aQute.maven.api.Archive>
toSelected(VersionSpecification[] specs, aQute.maven.api.Revision revision)
Match a revision against the version specifications and return the archives that are matches by any specification.static Set<BoundArchive>
toSelected(VersionSpecification[] specs, BoundRevision revision)
Match a revision against the version specifications and return the archives that are matches by any specification.String
toString()
-
-
-
Constructor Detail
-
VersionSpecification
public VersionSpecification()
-
-
Method Detail
-
parse
public static VersionSpecification[] parse(Properties props)
Parses the.- Parameters:
props
- the props- Returns:
- the version specification[]
-
getType
public VersionSpecification.Type getType()
Gets the type.- Returns:
- the type
-
toSelected
public static Set<aQute.maven.api.Archive> toSelected(VersionSpecification[] specs, aQute.maven.api.Revision revision)
Match a revision against the version specifications and return the archives that are matches by any specification.- Parameters:
specs
- the specsrevision
- the revision- Returns:
- the sets the result
-
toSelected
public static Set<BoundArchive> toSelected(VersionSpecification[] specs, BoundRevision revision)
Match a revision against the version specifications and return the archives that are matches by any specification.- Parameters:
specs
- the specsrevision
- the revision- Returns:
- the sets the result
-
isForced
public static boolean isForced(VersionSpecification[] specs, aQute.maven.api.Archive archive)
Checks if is forced.- Parameters:
specs
- the specsarchive
- the archive- Returns:
- true, if is forced
-
excluded
public static MavenVersionRange excluded(VersionSpecification[] specs, String artifact)
Find the exclude version range for the artifact with the given name. ReturnMavenVersionRange.NONE
if there is no exclude defined.- Parameters:
specs
- the specsartifact
- the artifact name- Returns:
- the sets the result
-
matches
public boolean matches(String name)
Match the given artifact name against the specification.- Parameters:
name
- the name- Returns:
- true, if it matches
-
-