public class VersionTables
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
Constructor and Description |
---|
VersionTables() |
Modifier and Type | Method and Description |
---|---|
static void |
addNewVersion(java.lang.Class<?> original,
java.lang.Class<?> version)
Adds a new version of one class
|
static java.lang.Class<?> |
getNewVersion(java.lang.Class<?> clazz)
Obtains the new version of the class
|
static java.lang.Class<?> |
getNewVersion(java.lang.String className)
Obtains the new version of the class
|
static java.util.List<java.lang.Class<?>> |
getVersions(java.lang.Class<?> clazz)
Obtains all version of one class
|
static boolean |
hasNewVersion(java.lang.Class<?> clazz)
Determines if a class has a new version or not
|
static boolean |
hasNewVersion(java.lang.String className)
Determines if a class has a new version or not
|
static boolean |
instanceHasNewVersion(java.lang.Object instance)
Determined if an instance has a new version available, which means that
either: - The class has a new version associated and the instance has not
(meaning that it is the first time that this instance have been used
since the class has a new version) - The instance has a new version, but
it is not of the same type of the new version of its class (meaning that
the instance has an older version object instance that belongs to a
previous class version type).
|
static java.lang.Class<?> |
isVersionOf(java.lang.Class<?> clazz)
Obtains the original class that is versioned by the class provided
|
static java.lang.Class<?> |
isVersionOf(java.lang.String className)
Obtains the original class that is versioned by the class provided
|
public static final boolean DEBUG
public static boolean instanceHasNewVersion(java.lang.Object instance)
instance
- The instance that maybe has new versionpublic static java.lang.Class<?> getNewVersion(java.lang.Class<?> clazz)
clazz
- The classpublic static java.lang.Class<?> getNewVersion(java.lang.String className)
className
- The full name of the classpublic static boolean hasNewVersion(java.lang.Class<?> clazz)
clazz
- The classpublic static boolean hasNewVersion(java.lang.String className)
className
- The full name of the class.public static void addNewVersion(java.lang.Class<?> original, java.lang.Class<?> version)
original
- The original classversion
- The new versionpublic static java.util.List<java.lang.Class<?>> getVersions(java.lang.Class<?> clazz)
clazz
- The classpublic static java.lang.Class<?> isVersionOf(java.lang.Class<?> clazz)
clazz
- The version classpublic static java.lang.Class<?> isVersionOf(java.lang.String className)
className
- The full name of the version class