public class VersioningUtils
extends Object
| Constructor and Description |
|---|
VersioningUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> List<Method> |
getMethodsOfGreaterVersion(T object,
String baseVersion)
Creates a list of version annotated methods, greater than a base version, for a given object.
|
static <T> Map<Method,Object> |
getValuesOfMethodsWithGreaterVersion(T object,
String baseVersion)
Creates a map of version annotated methods, greater than a base version, for a given object, and the values returned by each method
|
static String |
getVersionFromEndpoint(URL endpoint)
Extracts the Element OS version from a URL endpoint
|
static boolean |
isVersionGreater(String baseVersion,
String checkedVersion)
Confirms a version string is greater than a base version string
|
static boolean |
isVersionGreaterOrEqual(String baseVersion,
String checkedVersion)
Confirms a version string is greater than or equal to a base version string
|
static boolean |
isVersionLess(String baseVersion,
String checkedVersion)
Confirms a version string is less than a base version string
|
static boolean |
isVersionLessOrEqual(String baseVersion,
String checkedVersion)
Confirms a version string is less than or equal to a base version string
|
static boolean |
isVersionString(String possibleVersion)
Checks the format of the version.
|
static <T> Map<String,Constructor<T>> |
mapConstructorVersions(T object)
Creates a map of version annotated constructors for a given object.
|
static <T> Map<String,Constructor<T>> |
mapConstructorVersionsLargerThan(T object,
String baseVersion)
Creates a map of version annotated constructors, greater than a base version, for a given object.
|
static String |
methodParametersToString(Collection<Method> methods)
Creates a concatenated string of parameter names, from a collection of methods
|
static List<String> |
transformMethodsToParameterNames(List<Method> methods)
Creates a list of parameter names from a list of methods
|
public static String getVersionFromEndpoint(URL endpoint)
endpoint - an Element OS connection endpointpublic static boolean isVersionString(String possibleVersion)
possibleVersion - a possible Version stringpublic static boolean isVersionGreater(String baseVersion,
String checkedVersion)
baseVersion - the base version for comparisoncheckedVersion - the version of comparisonpublic static boolean isVersionGreaterOrEqual(String baseVersion,
String checkedVersion)
baseVersion - the base version for comparisoncheckedVersion - the version of comparisonpublic static boolean isVersionLess(String baseVersion,
String checkedVersion)
baseVersion - the base version for comparisoncheckedVersion - the version of comparisonpublic static boolean isVersionLessOrEqual(String baseVersion,
String checkedVersion)
baseVersion - the base version for comparisoncheckedVersion - the version of comparisonpublic static <T> Map<String,Constructor<T>> mapConstructorVersions(T object)
object - an object with one or more constructors annotated with the @Since annotationpublic static <T> Map<String,Constructor<T>> mapConstructorVersionsLargerThan(T object,
String baseVersion)
object - an object with one or more constructors annotated with the @Since annotationbaseVersion - the base version for comparisonpublic static <T> List<Method> getMethodsOfGreaterVersion(T object,
String baseVersion)
object - an object with one or more methods annotated with the @Since annotationbaseVersion - the base version for comparisonpublic static <T> Map<Method,Object> getValuesOfMethodsWithGreaterVersion(T object,
String baseVersion)
object - an object with one or more methods annotated with the @Since annotationbaseVersion - the base version for comparisonpublic static List<String> transformMethodsToParameterNames(List<Method> methods)
methods - a list of methodspublic static String methodParametersToString(Collection<Method> methods)
methods - a collection of methodsCopyright © 2014-2016 NetApp, Inc. All Rights Reserved.