Java knowledge-base tuning overview
Once you identify the issue (checker) and the criteria you need to communicate to the checker to prevent it, you:
- Create a text file with the .jkb extension.
- In the text file, describe the method signature.
- Add a knowledge base annotation, for example, @CheckTrue. For a high-level description of Java knowledge base records commonly used for tuning, see Knowledge base annotations.
- Bind the record to the checker, for example, with the @Bind annotation.
- Import the knowledge base into a project.
- Test the knowledge base with kwcheck.
- Edit the method and/or annotation as needed.
- Add another method, annotate it, and bind the method to the checker.
- Test until you are satisfied with your results.
- Use and share your new knowledge base.