* @throws KameleonException
* if there was an error while generating the file
*/
public void generate() throws KameleonException {
//System.out.println("Generator.generate()");
Paragraph previous = null ;
Iterator<Paragraph> iter = this.document.iterator() ;
boolean hasNext = true;
/* The document is empty. */
if (!iter.hasNext()) {
return ;
}// if
/* The document has at least one Paragraph */
Paragraph p = iter.next() ;
while (hasNext) {
try {
Method methode = Generator.class.getDeclaredMethod(
GENERATE_FUNC, p.getClass()) ;
methode.invoke(this, p) ;
previous = p ;
hasNext = iter.hasNext();
if (hasNext) {
p = iter.next() ;