public class DeleteFieldPrimitive extends FieldPrimitive
declaration, getter, name, setter, unarychangesClassHierarchy, classContent, clazz, modifiedClasses| Constructor and Description |
|---|
DeleteFieldPrimitive(ClassContent classContent,
java.lang.String name,
java.lang.Class<?> type) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSupportMethods(com.github.javaparser.ast.body.TypeDeclaration type)
Add deleted auxiliary methods
|
protected void |
executePrimitive()
Removes the declaration of one field from the source code of the class
|
protected java.lang.String |
getGetterDescriptor() |
protected java.lang.String |
getSetterDescriptor() |
protected java.lang.String |
getUnaryDescriptor() |
boolean |
isSafe()
Returns if the primitive is safe or not.
|
protected void |
removeSupportMethods(com.github.javaparser.ast.CompilationUnit unit,
com.github.javaparser.ast.body.TypeDeclaration type)
Delete the auxiliary method of the deleted field
|
protected void |
undoPrimitive()
Revert the changes done
|
getAuxiliaryMethodVisibilitychangeVersion, execute, getSuperClass, getTargetClass, undo, undoUpdateVersion, updateVersion, updateVersionpublic DeleteFieldPrimitive(ClassContent classContent, java.lang.String name, java.lang.Class<?> type)
protected void executePrimitive()
throws StructuralIntercessionException
executePrimitive in class AbstractPrimitiveStructuralIntercessionException - If there are any errorprotected void removeSupportMethods(com.github.javaparser.ast.CompilationUnit unit,
com.github.javaparser.ast.body.TypeDeclaration type)
unit - CompilationUnit of the classtype - TypeDeclaration of the classprotected void undoPrimitive()
throws StructuralIntercessionException
undoPrimitive in class AbstractPrimitiveStructuralIntercessionException - If there are any errorprotected void addSupportMethods(com.github.javaparser.ast.body.TypeDeclaration type)
type - TypeDeclaration of the classpublic boolean isSafe()
AbstractPrimitiveisSafe in interface PrimitiveisSafe in class AbstractPrimitiveprotected java.lang.String getGetterDescriptor()
protected java.lang.String getSetterDescriptor()
protected java.lang.String getUnaryDescriptor()