Class LawOfDemeterRule

  • All Implemented Interfaces:
    AstVisitor<Object,​Object>, JavaParserVisitor, JavaVisitor<Object,​Object>, PropertySource, Rule

    public class LawOfDemeterRule
    extends AbstractJavaRule
    This rule can detect possible violations of the Law of Demeter. The Law of Demeter is a simple rule, that says "only talk to friends". It helps to reduce coupling between classes or objects.

    See:

    • Andrew Hunt, David Thomas, and Ward Cunningham. The Pragmatic Programmer. From Journeyman to Master. Addison-Wesley Longman, Amsterdam, October 1999.
    • K.J. Lieberherr and I.M. Holland. Assuring good style for object-oriented programs. Software, IEEE, 6(5):38–48, 1989.
    Since:
    5.0
    Author:
    Clément Fournier