sofya.mutator.selectors
Class RandomMethodMutationSelector

java.lang.Object
  extended by sofya.mutator.selectors.MethodMutationSelector
      extended by sofya.mutator.selectors.RandomMethodMutationSelector
All Implemented Interfaces:
MutationSelector

public class RandomMethodMutationSelector
extends MethodMutationSelector

Mutation selector that randomly selects by method name and signature.

Version:
10/01/2005
Author:
Alex Kinneer

Nested Class Summary
 
Nested classes/interfaces inherited from class sofya.mutator.selectors.MethodMutationSelector
MethodMutationSelector.TypeSignature
 
Field Summary
 
Fields inherited from class sofya.mutator.selectors.MethodMutationSelector
nameSigTable
 
Constructor Summary
RandomMethodMutationSelector(java.util.List methodNames, int num)
          Creates a new mutation selector to select a given number of methods randomly; mutations occurring in selected methods will be selected.
RandomMethodMutationSelector(java.lang.String[] methodNames, int num)
          Creates a new mutation selector to select a given number of methods randomly; mutations occurring in selected methods will be selected.
 
Method Summary
 
Methods inherited from class sofya.mutator.selectors.MethodMutationSelector
addMethod, getVariant, isSelected, main, setMutationCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomMethodMutationSelector

public RandomMethodMutationSelector(java.lang.String[] methodNames,
                                    int num)
Creates a new mutation selector to select a given number of methods randomly; mutations occurring in selected methods will be selected.

Parameters:
methodNames -
num - Number of methods to be randomly selected.

RandomMethodMutationSelector

public RandomMethodMutationSelector(java.util.List methodNames,
                                    int num)
Creates a new mutation selector to select a given number of methods randomly; mutations occurring in selected methods will be selected.

Parameters:
methodNames - List of method descriptions supplied by the diffing tool, as strings. Mutations occurring in the selected methods will be selected. For best efficiency, the list should support random access.
num - Number of methods to be randomly selected.