randoop
Class LiteralFileReader

Object
  extended by LiteralFileReader

public class LiteralFileReader
extends Object

Reads a file specifying literal values to use during generation. Method parse(String) takes as input the name of a text file. The text file should contain one or more records of the form:

 START CLASSLITERALS
 CLASSNAME
 classname
 LITERALS
 type:value
 ...
 type:value
 END CLASSLITERALS
 
Capitalized text must appear literally. Lowercase text is as follows: Blank lines and comment lines (lines starting with "#") are ignored, both between records and inside records.

An example literals file appears in file randoop/systemtests/resources/literalsfile.txt.

LIMITATIONS:

Error messages do not include line numbers pointing to location of the error.

There is no way to specify literals that are not related to any class in particular, or literals that are related to only specific methods within a class.


Constructor Summary
Constructor and Description
LiteralFileReader()
           
 
Method Summary
Modifier and Type Method and Description
static MultiMap<Class<?>,PrimitiveOrStringOrNullDecl> parse(String inFile)
          Returns a map from class to list of constants.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiteralFileReader

public LiteralFileReader()
Method Detail

parse

public static MultiMap<Class<?>,PrimitiveOrStringOrNullDecl> parse(String inFile)
Returns a map from class to list of constants.