sb.append("    /** Clones all fields of this into <pre>other</pre> */\n");
sb.append("    /** Clones all fields of this into <pre>pre</pre>other</pre> */\n");
    private static String generateCloneInto(Class c) {        StringBuffer sb = new StringBuffer();        // ignore interfaces        if (c.isInterface()) {             sb.append("INTERFACE - ABORTING\n");            return sb.toString();        }        sb.append("    /** Clones all fields of this into <pre>other</pre> */\n");        sb.append("    protected void deepCloneInto(" + c.getName() + " other) {\n");        // if there's a superclass, then call deepClone on super.        if (c.getSuperclass()!=null && !c.getSuperclass().getName().equals("java.lang.Object")) {            if (!inTargetClasses(c.getSuperclass().getName())) {                System.err.println("WARNING:  Generating call to undefined method " + c.getSuperclass().getName() + ".deepCloneInto as super of " + c.getName() +                                   "\n  This is because " + c.getSuperclass().getName() + " is not in target classes.");            }            sb.append("        super.deepCloneInto(other);\n");        }        // get list of fields that should NOT be cloned (as specified        // by DO_NOT_CLONE_THESE_FIELDS array in class).        HashSet doNotClone = getProhibitedFields(c);        // copy all fields over, calling clone on them only if they        // are DeepCloneable and not a member of <doNotClone>        Field[] field = c.getDeclaredFields();        for (int i=0; i<field.length; i++) {            // get the value for the field            field[i].setAccessible(true);            // get the name, type of field            String name = field[i].getName().intern();            Class type = field[i].getType();            if (Modifier.isStatic(field[i].getModifiers())) {                // do nothing for static fields            } else if (// for primitives, copy them straight over                       type.isPrimitive() ||                       // for now, ignore serialization handles.  To be                       // changed once we get complete new cloning framework.                       name.equals("serializationHandle") ||                       // ignore SIROperator.parent, because this clones the entire tree                       name.equals("parent") && c.getName().equals("at.dms.kjc.sir.SIROperator") ||                       // ignore fields that we should not not clone                       doNotClone.contains(name)) {                sb.append("        other." + name + " = this." + name + ";\n");            } else {                // otherwise call toplevel cloning method                sb.append("        other." + name + " = (" + printSourceType(type) + ")at.dms.kjc.AutoCloner.cloneToplevel(this." + name + ");\n");            }        }        sb.append("    }\n");        return sb.toString();    }