Open hyperpape opened 4 years ago
I don't know why I wrote that 3 & 4 seemed like overkill. They seem worthwhile.
I've juste discovered your project and find it incredible. I have no time, yet, but I would gladly try to help you about this subject (I have some experience in writing maven plugin that read Java code - using as an example JavaParser libray for direct source access)
Cool! I haven't spent much time actively thinking about this since I created the initial issue, and I must admit, on second thought, I can't 100% reconstruct what I was thinking with (4).
Writing an annotation that describes a regex is straightforward enough. You'd have to provide the regex string, the classname and the package. But what would the annotation be applied to? I guess it could be a class level annotation?
As for (3) I don't really have a feel for how code-generation plugins are typically used. I know Immutables has a thing where you have to run the plugin for the first time on compiling a project, but I haven't looked into how that's achieved.
Users might want to create subclasses of Pattern at build-time, not run-time. A solution could be more or less involved (these aren’t mutually exclusive):
3 & 4 are probably overkill.