|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sofya.mutator.MutationImpl sofya.mutator.ClassMutation sofya.mutator.operators.HFR.HFRMutation
public static class HFR.HFRMutation
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface sofya.mutator.Mutation |
---|
Mutation.Variant |
Constructor Summary | |
---|---|
protected |
HFR.HFRMutation(java.lang.String className,
java.lang.String fieldName,
java.lang.String overriddenParent)
|
Method Summary | |
---|---|
void |
accept(MutationVisitor visitor)
Accepts a mutation visitor to perform some operation using this mutation. |
void |
apply(org.apache.bcel.generic.ClassGen cg,
Mutation.Variant variant)
Applies this mutation to the class file. |
static Mutation |
deserialize(java.io.DataInput in)
|
Mutation.Variant |
getDefaultVariant()
Gets the default variant selected by the mutation generator when the mutation table was generated. |
java.lang.String |
getType()
Gets the operator type abbreviation associated with this mutation. |
Mutation.Variant[] |
getVariants()
Gets all of the possible variants of this mutation. |
java.lang.String |
print()
Prints this mutation in a format suitable for display. |
void |
serialize(java.io.DataOutput out)
Serializes this mutation. |
java.lang.String |
toString()
|
void |
undo(org.apache.bcel.generic.ClassGen cg)
Reverses the actions performed to apply this mutation. |
Methods inherited from class sofya.mutator.MutationImpl |
---|
getID, setID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected HFR.HFRMutation(java.lang.String className, java.lang.String fieldName, java.lang.String overriddenParent)
Method Detail |
---|
public java.lang.String getType()
Mutation
public Mutation.Variant getDefaultVariant()
Mutation
A default variant ensures that a mutation can be applied without requiring user intervention. The policy for selecting an initial default is determined by the generating mutation operator, and is typically random.
null
from this method.public Mutation.Variant[] getVariants()
Mutation
A variant is one of set of mutually exclusive mutations that can be applied at the same code location. The simplest example of this is an operator mutation, where mutliple alternate operators can be substituted to produce a mutant.
public void accept(MutationVisitor visitor) throws MutationException
Mutation
visitor
- Mutation visitor that is visiting this mutation.
MutationException
- If an action performed on this mutation by the
visitor fails (this permits the exception to propagate).public void apply(org.apache.bcel.generic.ClassGen cg, Mutation.Variant variant) throws MutationException
Mutation
cg
- BCEL classfile object for the class being mutated.variant
- Index of the variant of the mutation to be applied.
MutationException
- If application of this mutation fails for any
reason.public void undo(org.apache.bcel.generic.ClassGen cg)
Mutation
Mutator
to automatically screen out illegal
mutants when mutant verification is enabled.
cg
- BCEL classfile object for the class to which this mutation
was applied.public void serialize(java.io.DataOutput out) throws java.io.IOException
Mutation
A mutation class should also provide a static method named
deserialize
that takes a single parameter of type
DataInput
and returns a Mutation. This method is
used by the framework to provide transparent automatic support
for new mutation operators, though it cannot be enforced by
the interface due to the need for a static method.
out
- Data output sink to which the mutation should be serialized.
java.io.IOException
- If serialization of this mutation fails for any
I/O related reason.public static Mutation deserialize(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public java.lang.String print()
Mutation
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |