Provide public access for every field used in the toString method 

es.uniovi.reflection.analyses.bloch.3.10s


This rule detects classes that do not provide public getters to access non-public fields which are used in the java.lang.Object:toString method. More precisely, it analyzes all the toString method body and detects fields concatenated with a String expression, calling the toString method or used as arguments when calling java.lang.StringBuilder:append, java.lang.StringBuffer:append, java.lang.Appendable:append, java.lang.String:format, java.util.Formatter:format, java.lang.String:formatted, java.lang.String:join, java.lang.String:valueOf.

Computational Reflection Research Group
09-30-2026 22:23
Bad Practice
Type Declaration