#694 xannotate generated new plugin#696
Closed
duttonw wants to merge 2 commits intohighsource:masterfrom
Closed
Conversation
…tations to all generated nodes where possible; useful for JaCoCo (which has built in support), or other style checkers and code coverage tools: Options value is TRUE or FALSE: To Disable @generated addition -XannotateGenerated -XannotateGenerated:addGeneratedAnnotation=FALSE To use your own class for @GeneratedAnnotations, use the following variable -XannotateGenerated -XannotateGenerated:customGeneratedAnnotationClass=com.example.MyGeneratedClass To add the @SuppressFBWarnings annotation which is useful if you want to run SpotBugs/FindBugs on your class files. To enable this feature, make sure com.github.spotbugs:spotbugs-annotations is on the classpath when you compile, and add the following config key: -XannotateGenerated -XannotateGenerated:addSuppressFBWarnings=TRUE To add the @SuppressWarnings("all") annotation to all generated nodes by default. This can be turned off which is useful if you want to use static code analyzers like Checker Framework. -XannotateGenerated -XannotateGenerated:addSuppressWarnings=FALSE You can set multiple variables. i.e. to only have FB Warnings you can do: -XannotateGenerated -XannotateGenerated:addSuppressWarnings=FALSE -XannotateGenerated:addSuppressFBWarnings=TRUE -XannotateGenerated:addGeneratedAnnotation=FALSE
mattrpav
reviewed
Apr 15, 2026
Collaborator
There was a problem hiding this comment.
What is the advantage of using a new annotation class?
There is already:
javax.annotation.Generated
Collaborator
There was a problem hiding this comment.
@mattrpav I've closed issue but not PR : I'll do it without merging
mattrpav
reviewed
Apr 15, 2026
Collaborator
There was a problem hiding this comment.
Most features in jaxb-tools are very shallow. Simple to use an anonymous or test-only impl class to provide similar capabilities. I'm not convinced the benefit of adding Mockito to the project outweighs the work needed to support it long term. (Mock libraries have had a short lifespan in the past and require re-write when they fall out of favor)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
see #694 requires #691