public class TemplateGenerator extends BaseFixtureGenerator
FieldGenerator instances.
Requires:
FieldGenerator| Constructor and Description |
|---|
TemplateGenerator(Object templateObject) |
| Modifier and Type | Method and Description |
|---|---|
TemplateGenerator |
addFieldGenerator(String fieldName,
FieldGenerator fieldGenerator)
Adds a
FieldGenerator. |
Class |
getGeneratedClass()
Returns the class of generated entities.
|
boolean |
hasNext()
Returns
true if the generator has more entity to generate (In other words, returns true if
next() would return an entity rather than throwing an exception.) |
Object |
next()
Returns the next generated entity.
|
removepublic TemplateGenerator(Object templateObject)
templateObject - the template entity to clone.public TemplateGenerator addFieldGenerator(String fieldName, FieldGenerator fieldGenerator)
FieldGenerator.fieldName - the field's name whom value is to be overridden.fieldGenerator - the field generator to addpublic boolean hasNext()
true if the generator has more entity to generate (In other words, returns true if
next() would return an entity rather than throwing an exception.)true if the iteration has more elements.public Object next()
NoSuchElementException - if the iteration has no more elements.public Class getGeneratedClass()
Copyright © 2014. All Rights Reserved.