//define a variable that records if the expression was already evaluated
SyntheticName exhaustedName = ctxtName.suffixedBy(Suffix.$exhausted$);
JCVariableDecl exhaustedDef = make().VarDef(make().Modifiers(Flags.PRIVATE),
exhaustedName.asName(), makeJavaType(typeFact().getBooleanDeclaration().getType()), null);
fields.add(exhaustedDef);
JCStatement returnIfExhausted = make().If(exhaustedName.makeIdent(), make().Return(makeBoolean(false)), null);
JCStatement setExhaustedTrue = make().Exec(make().Assign(exhaustedName.makeIdent(), makeBoolean(true)));
initBlock = List.<JCStatement>of(
//if we already evaluated the expression, return
returnIfExhausted,
//record that we will have evaluated the expression