Lombok does not generate source files at all. Annotation processors can generate source files, but lombok is not an annotation processor. We happen to use the mechanism of annotation processors to 'inject' ourselves into the java compiler when using javac, but for example lombok's eclipse implementation has nothing at all to do with annotation processing.
More to the point, perhaps, while we probably can generate entire sourcefiles (it's trivial in the javac implementation as we're already an annotation processor there!), there are zero lombok features that need to do this. Even our @Builder implementation just adds an inner class to an already existing one; we do NOT make an entirely new file.
Now, the thing is, the annotation processor API __ONLY__ lets you make entirely new ones. You can't even replace existing ones. Lombok does something quite different: It makes modifications to existing ones. But, we don't operate at the 'raw characters in a big buffer' level. We operate at the so-called AST and LST level. (An AST is source code, parsed into a tree. Once you start building symbol tables so that you can tell that for example the 'String' in 'String x = "Hello;"' must be referring to java.lang.String, and adding the ability to list all methods in java.lang.String so you can check if a call on x is in fact a valid reference, it's become an LST). Mostly at the AST level, because creating trees and such is very expensive and you get into a chicken and egg issue rather quickly.
So, that's how lombok works; We take the AST and modify it directly. We create an instance of JCMethodDecl for example, and add it to an existing JCClassDecl instance's 'defs' variable (which is a list, of members of the class declaration). The JCMethodDecl instance has a modifiers field, which we fill (with for example the flag 'public', and we fill the field that lists annotations on it with @SuppressWarnings, which is itself another instance of the JCAnnotation class, and so on and so forth).
Unfortunately, eclipse uses an entirely different compiler with an entirely different ast model, so that's unfortunately a lot of code duplication.
It would have been awesome if java shipped with an official, open source implementation of an AST which all compilers and tools and code checkers and such all use, but that's not the case, and javac has some hairy copyright issues (it's not LGPL), so everyone is making their own. We're sort of working on this (the lombok.ast project), but it's still work in progress. At any rate, that is how lombok works.