public class LiteralFileReader
extends java.lang.Object
parse(java.lang.String)
reads a file specifying literal values to use during generation. The text
file should contain one or more records of the form:
START CLASSLITERALS CLASSNAME classname LITERALS type:value ... type:value END CLASSLITERALSCapitalized text must appear literally. Lowercase text is as follows:
int:3
).
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.
Modifier | Constructor and Description |
---|---|
private |
LiteralFileReader() |
Modifier and Type | Method and Description |
---|---|
private static void |
appendRecord(java.lang.StringBuilder b,
java.util.List<java.lang.String> lines,
int i) |
static MultiMap<ClassOrInterfaceType,Sequence> |
parse(java.lang.String inFile)
Returns a map from class to list of constants.
|
private static void |
throwRecordSyntaxError(java.lang.String string,
java.util.List<java.lang.String> lines,
int i) |
private static void |
throwRecordSyntaxError(java.lang.Throwable e)
Throw an error with the given exception as its cause.
|
public static MultiMap<ClassOrInterfaceType,Sequence> parse(java.lang.String inFile)
inFile
- the input fileprivate static void throwRecordSyntaxError(java.lang.Throwable e)
e
- the causeprivate static void throwRecordSyntaxError(java.lang.String string, java.util.List<java.lang.String> lines, int i)
private static void appendRecord(java.lang.StringBuilder b, java.util.List<java.lang.String> lines, int i)