|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.mojo.versions.api.UpdateScope
public abstract class UpdateScope
Scopes of version updates.
Field Summary | |
---|---|
static UpdateScope |
ANY
Any version updates. |
static UpdateScope |
INCREMENTAL
Incremental version updates, that is the third segment of the version number, for example 1.0.0.15
to 1.0.1.0 . |
static UpdateScope |
MAJOR
Major version updates, that is the first segment of the version number, for example 1.0.0.15 to
2.0.0.0 . |
static UpdateScope |
MINOR
Minor version updates, that is the second segment of the version number, for example 1.0.0.15 to
1.1.0.0 . |
static UpdateScope |
SUBINCREMENTAL
Versions which are less than an incremental update. |
Method Summary | |
---|---|
static UpdateScope |
classifyUpdate(VersionComparator comparator,
org.apache.maven.artifact.versioning.ArtifactVersion from,
org.apache.maven.artifact.versioning.ArtifactVersion to)
Classifies the type of update. |
protected Object |
clone()
Throws CloneNotSupportedException. |
int |
compareTo(Object o)
Compares this enum with the specified object for order. |
boolean |
equals(Object o)
|
protected void |
finalize()
enum classes cannot have finalize methods. |
abstract org.apache.maven.artifact.versioning.ArtifactVersion[] |
getAllUpdates(VersionDetails versionDetails,
org.apache.maven.artifact.versioning.ArtifactVersion currentVersion,
boolean includeSnapshots)
Returns all versions newer than the specified current version within this scope. |
Class |
getDeclaringClass()
Returns the Class object corresponding to this enum constant's enum type. |
abstract org.apache.maven.artifact.versioning.ArtifactVersion |
getNewestUpdate(VersionDetails versionDetails,
org.apache.maven.artifact.versioning.ArtifactVersion currentVersion,
boolean includeSnapshots)
Returns the newest version after the specified current version within this scope. |
abstract org.apache.maven.artifact.versioning.ArtifactVersion |
getOldestUpdate(VersionDetails versionDetails,
org.apache.maven.artifact.versioning.ArtifactVersion currentVersion,
boolean includeSnapshots)
Returns the next version after the specified current version within this scope. |
int |
hashCode()
|
String |
name()
Returns the name of this enum constant, exactly as declared in its enum declaration. |
int |
ordinal()
Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero). |
String |
toString()
|
static UpdateScope |
valueOf(String name)
Returns the enum constant of the specified enum type with the specified name. |
static UpdateScope[] |
values()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final UpdateScope SUBINCREMENTAL
public static final UpdateScope INCREMENTAL
1.0.0.15
to 1.0.1.0
.
public static final UpdateScope MINOR
1.0.0.15
to
1.1.0.0
.
public static final UpdateScope MAJOR
1.0.0.15
to
2.0.0.0
.
public static final UpdateScope ANY
Method Detail |
---|
public abstract org.apache.maven.artifact.versioning.ArtifactVersion getOldestUpdate(VersionDetails versionDetails, org.apache.maven.artifact.versioning.ArtifactVersion currentVersion, boolean includeSnapshots)
versionDetails
- The versions to select from.currentVersion
- The current version.includeSnapshots
- Whether to include snapshots.
null
if there is no version within this scope.
org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException
- if there was a problem retrieving the list of available versions.public abstract org.apache.maven.artifact.versioning.ArtifactVersion getNewestUpdate(VersionDetails versionDetails, org.apache.maven.artifact.versioning.ArtifactVersion currentVersion, boolean includeSnapshots)
versionDetails
- The versions to select from.currentVersion
- The current version.includeSnapshots
- Whether to include snapshots.
null
if there is no version within this scope.public abstract org.apache.maven.artifact.versioning.ArtifactVersion[] getAllUpdates(VersionDetails versionDetails, org.apache.maven.artifact.versioning.ArtifactVersion currentVersion, boolean includeSnapshots)
versionDetails
- The versions to select from.currentVersion
- The current version.includeSnapshots
- Whether to include snapshots.
public final String name()
toString()
method in preference to this one, as the toString method may
return a more user-friendly name. This method is designed primarily for use in specialized situations where
correctness depends on getting the exact name, which will not vary from release to release.
public final int ordinal()
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
protected final Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public final int compareTo(Object o)
compareTo
in interface Comparable
public final Class getDeclaringClass()
Object.getClass()
method for enum constants with
constant-specific class bodies.)
public static UpdateScope valueOf(String name)
name
- the name of the constant to return
IllegalArgumentException
- if the specified enum type has no constant with the specified name, or the
specified class object does not represent an enum type
NullPointerException
- if enumType or name is nullpublic static UpdateScope[] values()
public static UpdateScope classifyUpdate(VersionComparator comparator, org.apache.maven.artifact.versioning.ArtifactVersion from, org.apache.maven.artifact.versioning.ArtifactVersion to)
comparator
- The version comparator to use for classifying.from
- The first version.to
- The second version.
protected final void finalize() throws Throwable
finalize
in class Object
Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |