TernaryToIfStatementConverter (Groovy 4.0.10)
Description: declaration: package: org.codehaus.groovy.transform.tailrec, class: TernaryToIfStatementConverter

Package org.codehaus.groovy.transform.tailrec

# Class TernaryToIfStatementConverter

java.lang.Object
org.codehaus.groovy.transform.tailrec.TernaryToIfStatementConverter

public class TernaryToIfStatementConverter extends Object
Since a ternary statement has more than one exit point tail-recursiveness testing cannot be easily done. Therefore this class translates a ternary statement (or Elvis operator) into the equivalent if-else statement.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TernaryToIfStatementConverter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Statement`
  `convert(ReturnStatement statementWithInnerTernaryExpression)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TernaryToIfStatementConverter

    public TernaryToIfStatementConverter()

- ## Method Details

  - ### convert

    public Statement convert(ReturnStatement statementWithInnerTernaryExpression)