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 classVersionSpecification.TypeThe Enum Type.
-
Constructor Summary
Constructors Constructor Description VersionSpecification()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MavenVersionRangeexcluded(VersionSpecification[] specs, String artifact)Find the exclude version range for the artifact with the given name.VersionSpecification.TypegetType()Gets the type.static booleanisForced(VersionSpecification[] specs, aQute.maven.api.Archive archive)Checks if is forced.booleanmatches(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.StringtoString()
-
-
-
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.NONEif 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
-
-