public class SetSuperClassPrimitive extends AbstractPrimitive
changesClassHierarchy, classContent, clazz, modifiedClasses| Constructor and Description |
|---|
SetSuperClassPrimitive(ClassContent classContent,
java.lang.Class<?> newSuperClass,
java.lang.Class<?>... typeParameters) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
changeVersion(java.lang.String content,
java.lang.Class<?> clazz,
int from,
int to)
Changes the version of the class in the source code.
|
protected void |
executePrimitive()
Adds the method and the invoker to the source code of the class
|
protected void |
undoPrimitive()
Reverts the changes
|
java.lang.String |
updateVersionRetStr(java.lang.Class<?> clazz,
java.lang.String superclassName) |
execute, getSuperClass, getTargetClass, isSafe, undo, undoUpdateVersion, updateVersion, updateVersionpublic SetSuperClassPrimitive(ClassContent classContent, java.lang.Class<?> newSuperClass, java.lang.Class<?>... typeParameters)
protected void executePrimitive()
throws StructuralIntercessionException
executePrimitive in class AbstractPrimitiveStructuralIntercessionException - If there are any errorprotected void undoPrimitive()
throws StructuralIntercessionException
undoPrimitive in class AbstractPrimitiveStructuralIntercessionException - If there are any errorpublic java.lang.String changeVersion(java.lang.String content,
java.lang.Class<?> clazz,
int from,
int to)
AbstractPrimitivechangeVersion in class AbstractPrimitivecontent - The source codeclazz - The original classfrom - Actual version number of the source codeto - New version numberpublic java.lang.String updateVersionRetStr(java.lang.Class<?> clazz,
java.lang.String superclassName)
throws StructuralIntercessionException
StructuralIntercessionException