public class ConstantMutationOperator extends MutationOperator
| Constructor and Description |
|---|
ConstantMutationOperator(String id,
Object constant)
Builds an instance of the operator given a constant value to be used in the return statement.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canMutate(org.pitest.reloc.asm.commons.Method method)
Returns a value indicating whether the operator can transform the given method.
|
void |
generateCode(org.pitest.reloc.asm.commons.Method method,
org.pitest.reloc.asm.MethodVisitor mv)
Generates the code associated with the mutation.
|
Object |
getConstant()
Give access to the constant value used by the operator
|
String |
getDescription() |
String |
getID() |
fromIDpublic ConstantMutationOperator(String id, Object constant)
id - The identifier for the instance of the operator. It does not have to coincide with the constant value.constant - The constant value to be usedpublic Object getConstant()
public boolean canMutate(org.pitest.reloc.asm.commons.Method method)
canMutate in class MutationOperatormethod - Method to be tested by the operatorpublic void generateCode(org.pitest.reloc.asm.commons.Method method,
org.pitest.reloc.asm.MethodVisitor mv)
generateCode in class MutationOperatormethod - Method to which the mutation should be appliedmv - MethodVisitor in charge of code generation.public String getID()
getID in class MutationOperatorpublic String getDescription()
getDescription in class MutationOperatorCopyright © 2018 eu.stamp-project. All rights reserved.