randoop
Class SeedSequences

Object
  extended by SeedSequences

public final class SeedSequences
extends Object

Provides functionality for creating a set of sequences that create a set of primitive values. Used by sequence generators.


Field Summary
Modifier and Type Field and Description
static List<Object> primitiveSeeds
           
 
Method Summary
Modifier and Type Method and Description
static Set<Sequence> defaultSeeds()
          A set of sequences that create primitive values, e.g.
static Set<Object> getSeeds(Class<?> c)
           
static Set<Sequence> getSeedsFromAnnotatedFields(Class<?>... classes)
          Inspects the declared fields of the given classes.
static Set<Sequence> objectsToSeeds(Collection<Object> objs)
          Precondition: objs consists exclusively of boxed primitives and strings.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

primitiveSeeds

public static final List<Object> primitiveSeeds
Method Detail

defaultSeeds

public static Set<Sequence> defaultSeeds()
A set of sequences that create primitive values, e.g. int i = 0; or String s = "hi";


objectsToSeeds

public static Set<Sequence> objectsToSeeds(Collection<Object> objs)
Precondition: objs consists exclusively of boxed primitives and strings. Returns a set of sequences that create the given objects.


getSeeds

public static Set<Object> getSeeds(Class<?> c)

getSeedsFromAnnotatedFields

public static Set<Sequence> getSeedsFromAnnotatedFields(Class<?>... classes)
Inspects the declared fields of the given classes. If it finds fields with a @TestValue annotation, ensures that the fields are static, public, and declare a primitive type (or String), or an array of such types. It returns a set of statement sequences corresponding to the values collected from the annotated fields.

Parameters:
classes - A collection of classes containing @TestValue annotation on one or more static fields.
Returns:
A set of Sequences representing primitive values collected frome @TestValue-annotated fields in the given classes