Package: org.codehaus.groovy.transform.tailrec

## [Java] Class RecursivenessTester

- org.codehaus.groovy.transform.tailrec.RecursivenessTester

-     public class RecursivenessTester
      extends Object

  Test if a method call is recursive if called within a given method node. Handles static calls as well.

  Currently known simplifications:

  - Does not check for method overloading or overridden methods
  - Does not check for matching return types; even void and any object type are considered to be compatible
  - Argument type matching could be more specific in case of static compilation
  - Method names via a GString are never considered to be recursive

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `isRecursive(Map<String, ASTNode> params)` Tests whether the supplied call node is recursive within the supplied method node.
    `` | `public boolean` | `isRecursive(MethodNode method, MethodCallExpression call)` Tests whether an instance-style method call is recursive.
    `` | `public boolean` | `isRecursive(MethodNode method, StaticMethodCallExpression call)` Tests whether a static method call is recursive.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### public boolean isRecursive(Map<String, ASTNode> params)

      Tests whether the supplied call node is recursive within the supplied method node.

      Parameters:
        `params` - a map containing `method` and `call` entries
      Returns:
        `true` if the call is recursive; `false` otherwise

    - #### public boolean isRecursive(MethodNode method, MethodCallExpression call)

      Tests whether an instance-style method call is recursive.

      Parameters:
        `method` - the enclosing method
        `call` - the method call to inspect
      Returns:
        `true` if the call targets the enclosing method; `false` otherwise

    - #### public boolean isRecursive(MethodNode method, StaticMethodCallExpression call)

      Tests whether a static method call is recursive.

      Parameters:
        `method` - the enclosing method
        `call` - the static method call to inspect
      Returns:
        `true` if the call targets the enclosing method; `false` otherwise