|
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.InterfaceValueGenerator
class InterfaceValueGenerator
A class to generate interface values. The approach is to choose randomly a concrete implementation class or subclass from a user-specified list, and to create its instance.
| Field Summary | |
|---|---|
private ValueFactory |
factory
Factory to create various types of values. |
private ValueGenerator |
generator
Generator to generate various types of values. |
| Constructor Summary | |
|---|---|
InterfaceValueGenerator(ValueFactory factory,
ValueGenerator generator)
Creates an interface generator that uses the given value factory and generator. |
|
| Method Summary | |
|---|---|
Denotable |
generate(Class type,
Context ctx,
int maxHeight)
Generates a value of the given interface or abstract class type in the given testing context. |
private String |
getImplClass(Class type,
Context ctx)
Returns an implementation class of the given type, if any; otherwise, return null. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private ValueFactory factory
private ValueGenerator generator
| Constructor Detail |
|---|
public InterfaceValueGenerator(ValueFactory factory,
ValueGenerator generator)
| Method Detail |
|---|
public Denotable generate(Class type,
Context ctx,
int maxHeight)
generate in interface ValueGeneratormaxHeight - Maximum height of the generated object (viewed
as a tree)
private String getImplClass(Class type,
Context ctx)
|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||