private void generate(Class c) {
        if (generated(c)) {
            return;
        }
        Class super_ = c.getSuperclass();
        boolean extendSuper = super_.isAnnotationPresent(GenerateWrapper.class);
        if (extendSuper) {
            generate(super_);
        }
        System.out.println("Generating wrapper for: " + c);
        String wrapperPackageName = getGeneratedPackageName(c);
        String wrapperSimpleName = getGeneratedSimpleName(c);
        boolean isAbstract = Modifier.isAbstract(c.getModifiers());
        String wrapperClassComment
                = "/**\n"
                + " *This is a generated artifact for " + c.getName() + "\n"
                + " */";
        String wrapperClassDecl = "public " + (isAbstract ? "abstract" : "") + " class "
                + wrapperSimpleName + (extendSuper ? (" extends " + getGeneratedFullName(super_)) : "");
        if (((GenerateWrapper) c.getAnnotation(GenerateWrapper.class)).serializable()) {
            wrapperClassDecl += " implements java.io.Serializable ";
        }
        List<FieldInformation> fieldDecls = new ArrayList<>();
        //get the declared fields only.
        Field[] declFields = c.getDeclaredFields();
        for (Field f : declFields) {
            if (Modifier.isFinal(f.getModifiers())
                    || Modifier.isStatic(f.getModifiers())
                    || f.isAnnotationPresent(Transient.class)) {
                continue;
            }
            fieldDecls.add(getField(f));
        }
        processSource(wrapperSimpleName, wrapperClassComment, wrapperPackageName, wrapperClassDecl, fieldDecls);
    }