Package: groovy.org.codenarc.rule.unused

## [Groovy] Class UnusedPrivateMethodRule

- groovy.org.codenarc.rule.unused.UnusedPrivateMethodRule

- Rule that checks for private methods that are not referenced within the same class. Known limitations:

  - Does not handle method reference through property access: getName() accessed as x.name
  - Does not handle method invocations when method name is a GString (e.g. this."${methodName}"
  - Does not handle invoking private method of another instance (i.e. other than 'this')
  - Does not differentiate between multiple private methods with the same name but different parameters (i.e., overloaded)
  - Does not check constructors
  Authors:
    Chris Mair
    Hamlet D'Arcy

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `String` | `name`
    `int` | `priority`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected AstVisitor` | `getAstVisitor(SourceCode sourceCode)`
    `` | `protected List<Violation>` | `getViolations(AstVisitor visitor, SourceCode sourceCode)`

- - ### Property Detail

    - #### String name

    - #### int priority

  - ### Method Detail

    - #### @Override protected AstVisitor getAstVisitor(SourceCode sourceCode)

    - #### @Override protected List<Violation> getViolations(AstVisitor visitor, SourceCode sourceCode)