TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - Java Coding Standard
Search

Rule:  CodeSize7Checked automatically with code checker

Synopsis:Too many fields
Language:Java
Severity Level:3
Category:CodeSize


Description:
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field. This rule is triggered in case a class has 15 or more fields.
public class Person {
   String one;
   int two;
   int three;
   [... many more public fields ...]
}