public abstract class ExportableGenerator { PrintWriter out = null; public ExportableGenerator(PrintWriter out) { super(); this.out = out; } public void genDoc(Employee e, int tagNum) {
Class employee = e.getClass(); Field[] fields = employee.getDeclaredFields(); outputFieldHeader(out,e); for (Field f : fields) { if (f.isAnnotationPresent(Exportable.class)) { if (f.getType() != ArrayList.class) { for(int i=0; i
清单24 TXTExportableGenerator
public class TXTExportableGenerator extends ExportableGenerator {
public TXTExportableGenerator(PrintWriter out) { super(out); }