Interface FunctionExpressionTree

All Superinterfaces:
ExpressionTree, Tree

@Deprecated(since="11",
            forRemoval=true)
public interface FunctionExpressionTree
extends ExpressionTree
Deprecated, for removal: This API element is subject to removal in a future version.
Nashorn JavaScript script engine and APIs, and the jjs tool are deprecated with the intent to remove them in a future release.
A tree node for function expressions including arrow functions. For example:
   var func = function
      ( parameters )
      body
 
   var func = (x) => x+1
 
Since:
9
  • Nested Class Summary

    Nested classes/interfaces declared in interface jdk.nashorn.api.tree.Tree

    Tree.Kind
  • Method Summary

    Modifier and Type Method Description
    Tree getBody()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the body of this function.
    IdentifierTree getName()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the name of the function being declared.
    List<? extends ExpressionTree> getParameters()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the parameters of this function.
    boolean isArrow()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Is this a arrow function?
    boolean isGenerator()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Is this a generator function?
    boolean isStrict()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Is this a strict function?

    Methods declared in interface jdk.nashorn.api.tree.Tree

    accept, getEndPosition, getKind, getStartPosition
  • Method Details

    • getName

      IdentifierTree getName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the name of the function being declared.
      Returns:
      name the function declared
    • getParameters

      List<? extends ExpressionTree> getParameters()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the parameters of this function.
      Returns:
      the list of parameters
    • getBody

      Tree getBody()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the body of this function. This may be a BlockTree when this function has a block body. This is an ExpressionTree when the function body is a concise expression as in an expression arrow, or in an expression closure.
      Returns:
      the body of this function
    • isStrict

      boolean isStrict()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Is this a strict function?
      Returns:
      true if this function is strict
    • isArrow

      boolean isArrow()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Is this a arrow function?
      Returns:
      true if this is a arrow function
    • isGenerator

      boolean isGenerator()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Is this a generator function?
      Returns:
      true if this is a generator function