Class SingleMethodSingletonRule

  • All Implemented Interfaces:
    net.sourceforge.pmd.lang.ast.AstVisitor, JavaVisitor, net.sourceforge.pmd.lang.rule.Rule, net.sourceforge.pmd.properties.PropertySource

    public class SingleMethodSingletonRule
    extends AbstractJavaRulechainRule
    Returns Checks if the singleton rule is used properly.
    • Constructor Detail

      • SingleMethodSingletonRule

        public SingleMethodSingletonRule()
    • Method Detail

      • visit

        public Object visit​(ASTClassDeclaration node,
                            Object data)
        Checks for getInstance method usage in the same class.
        Parameters:
        node - of ASTCLass
        data - of Object
        Returns:
        Object