Class MavenMatcher
- java.lang.Object
-
- org.hotswap.agent.versions.matcher.MavenMatcher
-
- All Implemented Interfaces:
VersionMatcher
public class MavenMatcher extends Object implements VersionMatcher
The MavenMatcher will parse and match a single @Mave definition- Author:
- alpapad@gmail.com
-
-
Constructor Summary
Constructors Constructor Description MavenMatcher(Maven cfg)Instantiates a new maven matcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetArtifactId()Gets the artifact id.VersionRangegetExcludes()Gets the excluded versions rangeStringgetGroupId()Gets the group id.VersionRangegetIncludes()Gets the included versions range.booleanisApply()Return true if this matcher should be applied!.VersionMatchResultmatches(DeploymentInfo info)Return a version match result.StringtoString()
-
-
-
Constructor Detail
-
MavenMatcher
public MavenMatcher(Maven cfg) throws InvalidVersionSpecificationException
Instantiates a new maven matcher.- Parameters:
cfg- the Maven annotation- Throws:
InvalidVersionSpecificationException- the invalid version specification exception
-
-
Method Detail
-
getIncludes
public VersionRange getIncludes()
Gets the included versions range.- Returns:
- the included versions range
-
getExcludes
public VersionRange getExcludes()
Gets the excluded versions range- Returns:
- the excluded versions range
-
getArtifactId
public String getArtifactId()
Gets the artifact id.- Returns:
- the artifact id
-
getGroupId
public String getGroupId()
Gets the group id.- Returns:
- the group id
-
matches
public VersionMatchResult matches(DeploymentInfo info)
Description copied from interface:VersionMatcherReturn a version match result. When an implementation is unable to decide then aVersionMatchResult.SKIPPEDshould be returned so the next one will have a chance to decide.- Specified by:
matchesin interfaceVersionMatcher- Parameters:
info- the info- Returns:
- the version match result
-
isApply
public boolean isApply()
Description copied from interface:VersionMatcherReturn true if this matcher should be applied!.- Specified by:
isApplyin interfaceVersionMatcher- Returns:
- true, if is apply
-
-