String typeClassName = TypeGenerator.qualifiedClassName(params, type); Iterator alts = type.alternativeIterator();  if (type instanceof ListType) { String protoVar = protoListVariable(type); println("  private " + typeClassName + ' ' + protoVar + ';'); println("  private aterm.ATerm " + patternListVariable(type) + ';'); println(); } else { while (alts.hasNext()) { Alternative alt = (Alternative) alts.next(); String funVar = funVariable(type, alt); String protoVar = prototypeVariable(type, alt); String patternVar = patternVariable(type, alt);  println("  private aterm.AFun " + funVar + ';'); println("  private " + typeClassName + " " + protoVar + ';'); println("  private aterm.ATerm " + patternVar + ';'); println(); } }
genTypeMembers(type, params); println();
    private void genPrivateMembers(ADT api) {        JavaGenerationParameters params = getJavaGenerationParameters();        // TODO: maybe ATermFactory is enough instead of PureFactory        println("  private aterm.pure.PureFactory factory;");        println();        Iterator types = api.typeIterator();        while (types.hasNext()) {            Type type = (Type) types.next();            String typeClassName = TypeGenerator.qualifiedClassName(params, type);            Iterator alts = type.alternativeIterator();            if (type instanceof ListType) {                String protoVar = protoListVariable(type);                println("  private " + typeClassName + ' ' + protoVar + ';');                println("  private aterm.ATerm " + patternListVariable(type) + ';');                println();            } else {                while (alts.hasNext()) {                    Alternative alt = (Alternative) alts.next();                    String funVar = funVariable(type, alt);                    String protoVar = prototypeVariable(type, alt);                    String patternVar = patternVariable(type, alt);                    println("  private aterm.AFun " + funVar + ';');                    println("  private " + typeClassName + " " + protoVar + ';');                    println("  private aterm.ATerm " + patternVar + ';');                    println();                }            }        }    }