[Groovy] Class RecursivenessTester

  • org.codehaus.groovy.transform.tailrec.RecursivenessTester
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

Constructor Summary

Constructors
Constructor and description
RecursivenessTester ()

Methods Summary

Methods
Type Params Return Type Name and description
boolean isRecursive(Object params)
boolean isRecursive(MethodNode method, MethodCallExpression call)
boolean isRecursive(MethodNode method, StaticMethodCallExpression call)

Inherited Methods Summary

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

Constructor Detail

RecursivenessTester()

Method Detail

boolean isRecursive(Object params)

@SuppressWarnings(value: Instanceof) boolean isRecursive(MethodNode method, MethodCallExpression call)

boolean isRecursive(MethodNode method, StaticMethodCallExpression call)

© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/org/codehaus/groovy/transform/tailrec/RecursivenessTester.html