OOP.LEVEL
Avoid more than two levels of nesting classes
Description
This rule flags nesting that is more than two levels deep.
Nesting that is more than two levels deep can be difficult to follow.
Example
package OOP;
public class LEVEL {
class Level1 {
class Level2 {
class Level3 {
private boolean _isClosed = false;
}
private int _count = 0;
}
private int _size = 0;
}
private int _length = 0;
}
Reference
Arnold, Ken, and Gosling, James The Java Programming Language. 2d ed. Addison Wesley, 1997, pp .53.
|