public class DeleteMethodPrimitive extends MethodPrimitive
Modifier and Type | Field and Description |
---|---|
protected com.github.javaparser.ast.body.MethodDeclaration |
declaration |
protected com.github.javaparser.ast.body.MethodDeclaration |
invoker |
exceptionClasses, exceptions, modifiers, parameterClasses, returnClass
changesClassHierarchy, classContent, clazz, modifiedClasses
Constructor and Description |
---|
DeleteMethodPrimitive(ClassContent classContent,
java.lang.String name,
java.lang.Class<?> returnClass,
java.lang.Class<?>[] parameterClasses) |
Modifier and Type | Method and Description |
---|---|
protected void |
executePrimitive()
Deletes one method and its invoker from the source code of the class
|
boolean |
isSafe()
Returns if the primitive is safe or not.
|
protected void |
undoPrimitive()
Reverts the changes
|
getBodyInvoker, getDescriptor, getInvokerDescriptor, setThrows
changeVersion, execute, getSuperClass, getTargetClass, undo, undoUpdateVersion, updateVersion, updateVersion
protected com.github.javaparser.ast.body.MethodDeclaration declaration
protected com.github.javaparser.ast.body.MethodDeclaration invoker
public DeleteMethodPrimitive(ClassContent classContent, java.lang.String name, java.lang.Class<?> returnClass, java.lang.Class<?>[] parameterClasses)
protected void executePrimitive() throws StructuralIntercessionException
executePrimitive
in class AbstractPrimitive
StructuralIntercessionException
- If there are any errorprotected void undoPrimitive() throws StructuralIntercessionException
undoPrimitive
in class AbstractPrimitive
StructuralIntercessionException
- If there are any errorpublic boolean isSafe()
AbstractPrimitive
isSafe
in interface Primitive
isSafe
in class AbstractPrimitive