Closed pascalgn closed 5 years ago
I agree with you about the expectation here.
I propose to make this an option on the JavaParser
, with a default value to exclude static fields.
This flag should in turn be passed into the ClassVisitor
through the convert
static method. I guess it is the visit(FieldDeclaration, ClassBuilder)
in ClassVisitor
which should exclude these fields based on the content of field.getModifiers()
.
Do you want/have time to make a PR for this?
Sure, will create a PR for it!
@pascalgn: I've released javaflow@1.5.0 and javaflow-maven-plugin@1.4.0 with the all changes included. Please, when you have time, let me know if the release works on your project 🙏
And thank you so much for these contributions 💯
PS: it might take a little while before the updated plugin show up the maven repositories.
@havardh Thanks a lot for the quick release! Sorry for not getting back to you sooner, but I had a lot to do in the last few days. However, I have just finished implementing javaflow in our project and it is working. It's not perfect and there are a few workarounds we had to do, but we get the generated types and can use them and that's already helping us a lot!
So thank you again for this nice project! 👍
I will create issues for the workarounds we currently have to do, both here and over in javaflow-maven-plugin. Some might be easy to resolve, others I'm not sure about, so let's have a look at them together. Of course, when you feel a feature/issue does not fit the direction of the project, just say so and/or close it!
Do not worry about getting back in time. :) Lets allow each other the slack we need ;) I'm in no hurry.
Its great to hear that you are already benefiting from javaflow
, now lets get to a 100% ;)
I noticed that during type generation, static fields are not excluded, so for example this Java class:
currently results in this type:
whereas I would expect it to result in this type:
WDYT?