| java.lang.Object com.sleepycat.persist.evolve.Mutation com.sleepycat.persist.evolve.Renamer
Renamer | public class Renamer extends Mutation (Code) | | A mutation for renaming a class or field without changing the instance or
field value. For example:
package my.package;
// The old class. Version 0 is implied.
//
class Person {
String name;
}
// The new class. A new version number must be assigned.
//
class Human {
String fullName;
}
// Add the mutations.
//
Mutations mutations = new Mutations();
mutations.addRenamer(new Renamer("my.package.Person", 0,
Human.class.getName()));
mutations.addRenamer(new Renamer("my.package.Person", 0,
"name", "fullName"));
// Configure the mutations as described
Mutations here .
See Also: com.sleepycat.persist.evolve See Also: Class Evolution author: Mark Hayes |
Constructor Summary | |
public | Renamer(String fromClass, int fromVersion, String toClass) Creates a mutation for renaming the class of all instances of the given
class version. | public | Renamer(String declaringClass, int declaringClassVersion, String fromField, String toField) Creates a mutation for renaming the given field for all instances of the
given class version. |
Renamer | public Renamer(String fromClass, int fromVersion, String toClass)(Code) | | Creates a mutation for renaming the class of all instances of the given
class version.
|
Renamer | public Renamer(String declaringClass, int declaringClassVersion, String fromField, String toField)(Code) | | Creates a mutation for renaming the given field for all instances of the
given class version.
|
equals | public boolean equals(Object other)(Code) | | Returns true if the new class name is equal in this object and given
object, and if the
Mutation.equals method returns true.
|
getNewName | public String getNewName()(Code) | | Returns the new class or field name specified in the constructor.
|
hashCode | public int hashCode()(Code) | | |
|
|