Iterator alts = type.alternativeIterator(); while (alts.hasNext()) { Alternative alt = (Alternative) alts.next(); genIsAlt(type, alt); }  Iterator fields = type.fieldIterator(); while (fields.hasNext()) { Field field = (Field) fields.next(); genHasField(type, field); genGetField(type, field); genSetField(type, field); }
genIsAlts(type); genHasFields(type); genGetFields(type); genSetFields(type);
	private void genAccessors(ADT api) throws GenerationException {		Iterator types = api.typeIterator();		while (types.hasNext()) {			Type type = (Type) types.next();			String type_name = buildTypeName(type);			bothPrintFoldOpen(type_name + " accessors");			genTypeIsValid(type);			Iterator alts = type.alternativeIterator();			while (alts.hasNext()) {				Alternative alt = (Alternative) alts.next();				genIsAlt(type, alt);			}			Iterator fields = type.fieldIterator();			while (fields.hasNext()) {				Field field = (Field) fields.next();				genHasField(type, field);				genGetField(type, field);				genSetField(type, field);			}			bothPrintFoldClose();		}	}