|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.utep.cs.et.rat.gen.ArrayValueGenerator
class ArrayValueGenerator
A class to generate an array value randomly.
| Field Summary | |
|---|---|
private Context |
context
Testing context. |
private ValueFactory |
factory
Factory to create various types of values. |
private ValueGenerator |
generator
Generator to generate various types of values randomly. |
private static int |
MAX_LENGTH
The maximum length of the array. |
private static Random |
random
A random number generator. |
| Constructor Summary | |
|---|---|
ArrayValueGenerator(ValueFactory factory,
ValueGenerator generator)
Creates a generic array generator. |
|
| Method Summary | |
|---|---|
private Denotable |
buildArray(Class type,
int maxHeight,
int dim,
boolean isTop)
Creates an array of the given type and dimension. |
Denotable |
generate(Class type,
Context ctx,
int maxHeight)
Generates an array value of the given type under the given testing context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int MAX_LENGTH
private Context context
private static final Random random
private final ValueFactory factory
private final ValueGenerator generator
| Constructor Detail |
|---|
public ArrayValueGenerator(ValueFactory factory,
ValueGenerator generator)
| Method Detail |
|---|
public Denotable generate(Class type,
Context ctx,
int maxHeight)
maxHeight - Maximum height of the generated object (viewed
as a tree)
private Denotable buildArray(Class type,
int maxHeight,
int dim,
boolean isTop)
maxHeight - Maximum height of the generated object (viewed
as a tree)
|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||