Class JS.ArrowFunction

java.lang.Object
org.openrewrite.javascript.tree.JS.ArrowFunction
All Implemented Interfaces:
org.openrewrite.java.tree.Expression, org.openrewrite.java.tree.J, org.openrewrite.java.tree.Statement, org.openrewrite.java.tree.TypedTree, JS, org.openrewrite.Tree
Enclosing interface:
JS

public static final class JS.ArrowFunction extends Object implements JS, org.openrewrite.java.tree.Statement, org.openrewrite.java.tree.Expression, org.openrewrite.java.tree.TypedTree
A JavaScript `=>` is similar to a Java lambda, but additionally contains annotations, modifiers, type arguments. The ArrowFunction prevents J.Lambda recipes from transforming the LST because an ArrowFunction may not be transformed in the same way as a J.Lambda.
  • Constructor Details

    • ArrowFunction

      public ArrowFunction()
  • Method Details

    • acceptJavaScript

      public <P> org.openrewrite.java.tree.J acceptJavaScript(JavaScriptVisitor<P> v, P p)
      Specified by:
      acceptJavaScript in interface JS
    • getCoordinates

      public org.openrewrite.java.tree.CoordinateBuilder.Statement getCoordinates()
      Specified by:
      getCoordinates in interface org.openrewrite.java.tree.Expression
      Specified by:
      getCoordinates in interface org.openrewrite.java.tree.Statement