Class InvalidSegmentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.codehaus.mojo.versions.ordering.InvalidSegmentException
- All Implemented Interfaces:
Serializable
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidSegmentException(Segment segment, int segmentCount, org.apache.maven.artifact.versioning.ArtifactVersion version) Constructs a newInvalidSegmentException. -
Method Summary
Modifier and TypeMethodDescriptionReturns the invalidSegment.intReturns the number of segments in the version.org.apache.maven.artifact.versioning.ArtifactVersionReturns theArtifactVersionassociated with the exception.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidSegmentException
public InvalidSegmentException(Segment segment, int segmentCount, org.apache.maven.artifact.versioning.ArtifactVersion version) Constructs a newInvalidSegmentException.- Parameters:
segment- the invalidSegment; must not benullsegmentCount- the number of segments in the version; must be non-negativeversion- theArtifactVersioninstance; must not benull
-
-
Method Details
-
getSegment
-
getSegmentCount
public int getSegmentCount()Returns the number of segments in the version.- Returns:
- the segment count (non-negative)
-
getVersion
public org.apache.maven.artifact.versioning.ArtifactVersion getVersion()Returns theArtifactVersionassociated with the exception.- Returns:
- the
ArtifactVersion; nevernullfor a correctly constructed exception
-